
Jquery,really makes easy to work with scripts,and the updates in it's api is really impressive,hence this trick is very easy in which you do not have to add any class in the parent element (which contain child elements) in the listing.But it will be added by using Jquery and you can customize accordingly.
Check the pen below to see the effect
The method I've used is
.has()
function that decrease the set of matched elements that have ul
as a child element in it.Then,.addClass()
to add a specific class
in the set of matched elements.
Post A Comment:
0 comments: