Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the Output of code ? $( "div#first, div.first, ol#items > [name$='first']" )

user-image
Question ajoutée par Mohd Nadeem Mohd Rehman Mohammed , Software Engineer , Softworx Technologies
Date de publication: 2016/10/05
Saud Rashid
par Saud Rashid , Project Manager , Buzytech IT Solutions

This code performs a query to retrieve any <div> element with the id first, plus all <div> elements with the class first, plus all elements which are children of the <ol id="items"> element and whose name attribute ends with the string "first".  This is an example of using multiple selectors at once. The function will return a jQuery object containing the results of the query.

Utilisateur supprimé
par Utilisateur supprimé

I fully support Saud Rashid answer

Muhammad Wasif Laeeq
par Muhammad Wasif Laeeq , Senior Web Developer , Server4Sale LLC

Nothing, an error... It's just a selector. If you want to ask what it will select, It will select div which has id first and any divs which have class first and the elements which have name attribute first and are children of ol with id items.

More Questions Like This