Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Mohd Nadeem Mohd Rehman Mohammed , Software Engineer , Softworx Technologies
Date Posted: 2016/10/05
Saud Rashid
by 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.

Deleted user
by Deleted user

I fully support Saud Rashid answer

Muhammad Wasif Laeeq
by 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

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.