PHP Classes

JQPHP: Generate HTML using jQuery added programmatically

Recommend this page to a friend!
  Info   View files Example   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 166 All time: 8,870 This week: 129Up
Version License PHP version Categories
jqphp 1.0.0GNU General Publi...5.4HTML, PHP 5


This package can generate HTML using jQuery added programmatically.

It can generate HTML with JavaScript statements that can perform operations like:

- Showing alert messages
- Select elements with give selector expressions
- Set CSS styles or other element attributes
- Redirect the browser to other pages
- Toggle the visibility of elements
- Animate html elements
- Etc..

Picture of Samuel Adeshina
  Performance   Level  
Name: Samuel Adeshina is available for providing paid consulting. Contact Samuel Adeshina .
Classes: 19 packages by
Country: Nigeria Nigeria
Age: 25
All time rank: 5252 in Nigeria Nigeria
Week rank: 100 Up5 in Nigeria Nigeria Down
Innovation award
Innovation award
Nominee: 7x

Winner: 1x


JQPhp\Selector\Attributes as Attributes;
JQPhp\Selector\Basics as Basics;
/* echo "<a id='vi' href='#'>Hi, I'm Samuel</a><br/>";
    echo "<a id='vim' href='#'>Hi, I'm Samuel</a><br/>";
    echo "<p class='small'>I am a very small text</p>";*/
$enable = new JQPhp\Enable("jquery.js");
$prefix = new Attributes\Contains("a", "hreflang", "en" new JQPhp\jquery());
$prefix->css("border", "3px dotted green");




JQPhp is a PHP Library that was built to perform javascript operations directly within PHP codes. A simple explanation would be instead of typing the following to display an alert &lt;script&gt;$(document).ready(function(){ alert("This is an alert"); }) All you have to do is $jqphp->Alert("This is an alert").

It hasn't been built to replace JQuery or Javascript but to make it easy to work with these technologies from PHP without worrying about them. In fact, it makes calls to the JQuery library from behind the scenes.

The library has been categorized into various namespaces depending on what the classes do. the available namespaces are:

  1. \JQPhp
  2. \JQPhp\Shared
  3. \JQPhp\Selector
  4. \JQPhp\Selector\Attributes
  5. \JQPhp\Selector\Basics
  6. \JQPhp\Selector\Filters 7 ..... and so on. (This library is still in active development)

A very simple usage of this class would be to make the background color of all anchor elements where the href attribute is red and it is illustrated below:

use JQPhp; use JQPhp\Selector\Attributes;

$a-element = Attributes\Equals("a", "href", "", new JQPhp\jquery()); $a-element->css("background-color", "red");

Visit this project's page at: or feel free to send me an email: samueladeshina73 at gmail dot com

  Files folder image Files  
File Role Description
Files folder imagemaster (2 directories)
Accessible without login Plain text file LICENSE Lic. License
Accessible without login Plain text file Doc. Readme
Accessible without login Plain text file readme.txt Doc. Added a readme in .txt format

  Files folder image Files  /  master  
File Role Description
Files folder imagedemo (3 files)
Files folder imagesrc (5 files)

  Files folder image Files  /  master  /  demo  
File Role Description
  Accessible without login Plain text file demo.php Example Example
  Accessible without login HTML file html.html Data Example
  Accessible without login Plain text file jquery.js Data JQuery Library

  Files folder image Files  /  master  /  src  
File Role Description
  Plain text file JQPhp.php Class Namespace
  Plain text file JQPhp.Selector.Attributes.php Class Namespace
  Plain text file JQPhp.Selector.Basics.php Class Namespace
  Plain text file JQPhp.Selector.Filters.php Class Namespace
  Plain text file shared.php Class Namespace

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,870
This week:129Up