jquery - Hiding all li items except one -
this question has answer here:
- jquery: hide children, show nth child? 1 answer
- hide $(this) via :not in jquery selector 4 answers
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
Post a Comment