PluginProbe
Page Builder: Pagelayer – Drag and Drop website builder / 2.2.0
Page Builder: Pagelayer – Drag and Drop website builder v2.2.0
2.2.1 2.2.0 2.1.9 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 trunk 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.0.2 1.0.3 1.0.4 1.0.5 All 129 releases
pagelayer / lib / pquery / README.md

README.md in Page Builder: Pagelayer – Drag and Drop website builder 2.2.0, at lib/pquery/README.md

50 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # pQuery
2
3 [](https://travis-ci.org/tburry/pquery![Build Status](https://img.shields.io/travis/tburry/pquery.svg?style=flat)](https://travis-ci.org/tburry/pquery](https://travis-ci.org/tburry/pquery)
4 [](https://scrutinizer-ci.com/g/tburry/pquery/![Coverage](https://img.shields.io/scrutinizer/coverage/g/tburry/pquery.svg?style=flat)](https://scrutinizer-ci.com/g/tburry/pquery/](https://scrutinizer-ci.com/g/tburry/pquery/)
5 [](https://packagist.org/packages/tburry/pquery![Latest Stable Version](http://img.shields.io/packagist/v/tburry/pquery.svg?style=flat)](https://packagist.org/packages/tburry/pquery](https://packagist.org/packages/tburry/pquery)
6
7 pQuery is a jQuery like html dom parser written in php. It is a fork of the [](https://code.google.com/p/ganon/ganon dom parser](https://code.google.com/p/ganon/](https://code.google.com/p/ganon/).
8
9 ## Basic usage
10
11 To get started using pQuery do the following.
12
13 1. Require the pQuery library into your project using [](http://getcomposer.org/doc/01-basic-usage.md#the-require-keycomposer](http://getcomposer.org/doc/01-basic-usage.md#the-require-key](http://getcomposer.org/doc/01-basic-usage.md#the-require-key).
14 2. Parse a snippet of html using `pQuery::parseStr()` or `pQuery::parseFile()` to return a document object model (DOM).
15 3. Run jQuery like functions on the DOM.
16
17 ## Example
18
19 The following example parses an html string and does some manipulation on it.
20
21 ```php
22 $html = '<div class="container">
23 <div class="inner verb">Hello</div>
24 <div class="inner adj">Cruel</div>
25 <div class="inner obj">World</div>
26 </div>';
27
28 $dom = pQuery::parseStr($html);
29
30 $dom->query('.inner')
31 ->tagName('span');
32
33 $dom->query('.adj')
34 ->html('Beautiful')
35 ->tagName('i');
36
37 echo $dom->html();
38 ```
39
40 ## Differences between pQuery and ganon
41
42 pQuery is a fork of the [ganon php processor](https://code.google.com/p/ganon/). Most of the functionality is identical to ganon with the following exceptions.
43
44 * pQuery is a composer package.
45 * pQuery renames ganon's classes and puts them into a namespace.
46 * pQuery is used only with objects rather than functions so that it can be autoloaded.
47 * pQuery Adds the `IQuery` interface and the `pQuery` object that define the jQuery-like interface for querying the dom.
48 * pQuery implements more of jQuery's methods. See the `IQuery` interface for a list of methods.
49 * pQuery supports adding tags to the dom using the `<div class="something"></div>` notation rather than just `div`.
50