jquery - Hiding all li items except one -


this question has answer here:

how hide li items except one?? hide element s of li excepting particular li item

will work??

        $(".divmenu").find('li').css("display", "none");         $(".divmenu").find('li nth-child(4)').css("color", "red"); 

or this??

       $(".divmenu").find('li:not(nth-child(4))').css("display", "none");  

this 1 seems simple not working ..might wrong syntax?? please provide simple , efficient techniques

$(".divmenu").not(":nth-child(4)").css("display", "none"); 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -