jquery - selector exclusive css in particular situation -
i using :
$(".header.nav.nav-user").click(function(){});
but when change css ".header .nav .disable .nav-user
", not want trigger click event.
but in situation, $(".header.nav.nav-user")
getting triggered when css changed ".header .nav .disable .nav-user"
.
how can exclude situation?
i have tried :
$(".header.nav.nav-user :not(.disable)")
and
$(".header.nav.nav-user").not(".disable"),
but both times failed desired result.
please tell me ways this.
appreciate help! thanks.
update: situation is:(i want trigger click event)
<div class="header"> <div class="nav"> <dt class="nav-user"> </dt> </div> </div>
and is:(i don't want trigger click event)
<div class="header"> <div class="nav"> <dl class="disable"> <dt class="nav-user"> </dt> </dl> </div> </div>
and change use other javascript,not change code.
try this
$(".header.nav.nav-user").not(":disable")
Comments
Post a Comment