Friday, November 19, 2010

ID (#tagid)

To select the unique element with an ID equal to tagid.

Examples

1- $('#tagid') selects the unique element with id="tagid"
2- $('p#tagid') selects a single paragraph with an ID of tagid


2nd one is showing how the unique element

will be selected in case if more than one element
has been assigned the same ID, queries that use that ID will only select the first matched element in the DOM.

No comments:

Post a Comment