Blogger Ever

Customize the element in drop down menu which have child element using Jquery and CSS

Customize the element in drop down menu which have child element using Jquery and CSS

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
In the above pen you can see that the parents have the plus (+) and when you hover on it,the plus become minus (-) this is the simple example of what I want to show.

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.
Blogger

2013-2016 Copyright Blogger E\ver . Coded, managed and founded by Mohammad Hamza (@hamzadhamiya) . Hosted on Blogger and fonts used are Raleway and Open Sans.