Saturday, August 24, 2013

Basic selectors in Jquery

Identifying the element by tag  name
Ex: $('p') -> selects all paragraphs in the document

Identifying the element by ID
Ex: $(‘#divUser’) -> selects a DOM element which contains ID as “divUser”.

Identifying  the element by class

Ex: $(‘.divUser’) -> selects a DOM element which contains class as “divUser”.

No comments:

Post a Comment