PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2015-08-17 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 158 All time: 8,124 This week: 1,081Up
Version License PHP version Categories
jqphp 1.0.0GNU General Publi...5.4HTML, PHP 5
Description Author

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 <contact>
Classes: 19 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Details

JQPhp

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 http://samshal.users.phpclasses.org red and it is illustrated below:

use JQPhp; use JQPhp\Selector\Attributes;

$a-element = Attributes\Equals("a", "href", "http://samshal.users.phpclasses.org", new JQPhp\jquery()); $a-element->css("background-color", "red");

Visit this project's page at: http://samshal.github.io/JQPhp/ 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 README.md 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  
 100%
Total:158
This week:0
All time:8,124
This week:1,081Up