In this coded which are the selectors. Please explain them.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ashutosh GuptaPosted Dec 5, 2019, 12:15 AM
Sandhiya PriyaPosted Jan 6, 2026, 3:45 AM
In your HTML, the main jQuery selectors are:
ID selectors ?
$("#languages"),$("#web")Class selector ?
$(".functional")Tag selector ?
$("li"),$("ul")Descendant/child selectors ?
$("#languages li"),$("#languages > li"),$("#web li")Positional selectors ?
$("#languages li:first"),$("#languages li:last"),$("#languages li:eq(1)")These let you target elements by id, class, tag, hierarchy, or position.
Harsh ShahPosted Dec 10, 2019, 11:25 PM
Faisal PathanPosted Dec 5, 2019, 12:48 AM
Ramachandran MPosted Dec 4, 2019, 11:28 PM
console.log($('#languages').children('li:first').text());
//Result Java
console.log($('#web').children('li:first').text());
//Result JavaScript
console.log($('#languages').children('li:last').text());
//Result List
});
Sanwar RanwaPosted Dec 4, 2019, 11:10 PM
"languages"
>"web"
>