Skip to content

Commit

Permalink
add attribute select intro. in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yodalee committed Sep 19, 2014
1 parent 7399fbb commit a3bd288
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/attributes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Attributes
..
>>> from pyquery import PyQuery as pq
Using attribute to select specific tag
In attribute selectors, the value should be a valid CSS identifier or quoted as string::

>>> d = pq("<option value='1'><option value='2'>")
>>> d('option[value="1"]')
[<option>]


You can play with the attributes with the jquery API::

>>> p = pq('<p id="hello" class="hello"></p>')('p')
Expand Down

0 comments on commit a3bd288

Please sign in to comment.