How jQuery selectors are executed?

Answer Posted / chaitanya

Your last selectors is always executed first. For example, in below jQuery code, jQuery will first find all the elements with class ".myCssClass" and after that it will reject all the other elements which are not in "p#elmID".

Hide Copy Code

$("p#elmID .myCssClass");

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain slidetoggle() effect.

514


What is $() in jquery?

506


How we can get the value of a radio button using jquery?

422


Tell me an example usage of jquery mobile? : jquery mobile

467


Explain the difference between body onload() and document.ready() function? : jquery mobile

472






Explain some benefits of jquery knockout?

457


How can you apply a style on an element using jQuery?

462


what are the features of jquery

473


How to concatenate two strings using jquery?

484


What are the approaches of extracting a query string with regular expressions?

407


What is a jquery ajax?

432


Do you have plans for a new jquery plug-in or something else we should look out for? Where to from here for the imgpreview plugin?

476


What is parent() in jquery?

472


Explain the common methods of sending a request to a server.

472


Hide and show image on button click using jQuery?

446