What are jQuery Selectors? Give some examples?
Submitted by: Administrator1. jQuery Selectors are used to select one or a group of HTML elements from your web page.
2. jQuery support all the CSS selectors as well as many additional custom selectors.
3. jQuery selectors always start with dollar sign and parentheses: $().
4. There are three building blocks to select the elements in a web document.
1) Select elements by tag name
Example : $(div)
It will select all the div elements in the document.
2) Select elements by ID
Example : $("#xyzid")
It will select single element that has an ID of xyzid.
3) Select elements by class
Example : $(".xyzclass")
It will select all the elements having class xyzclass.
Submitted by:
2. jQuery support all the CSS selectors as well as many additional custom selectors.
3. jQuery selectors always start with dollar sign and parentheses: $().
4. There are three building blocks to select the elements in a web document.
1) Select elements by tag name
Example : $(div)
It will select all the div elements in the document.
2) Select elements by ID
Example : $("#xyzid")
It will select single element that has an ID of xyzid.
3) Select elements by class
Example : $(".xyzclass")
It will select all the elements having class xyzclass.
Submitted by:
Read Online JQuery Programmer Job Interview Questions And Answers
Top JQuery Programmer Questions
☺ | What are jQuery Selectors? Give some examples? |
☺ | How to get the direct parent of an element using jQuery? |
☺ | How to set the style property of an element using jQuery? |
☺ | How to get the height of an element using jQuery? |
☺ | Explain the common methods of sending a request to a server? |
Top Scripting language Categories
☺ | AngularJS Interview Questions. |
☺ | Ext-JS Interview Questions. |
☺ | Dojo Interview Questions. |
☺ | Expert Developer JavaScript Interview Questions. |
☺ | SWFObject Interview Questions. |