javascript - jQuery .not() problem -


i need operations elements have class show-all , have no class disabled. code:

$('.show-all').not('.disabled').click(function() {     alert('1'); }) 

but works if element has disabled class. can me? sorry english. thank in advance. code, works fine now:

$(document).ready(function() {     $('.show-all:not(.disabled)').click(function() {         if (!$(this).hasclass('disabled')) {             $(this).parent().parent().find('li').removeclass('hidden-item');             $(this).addclass('transparent-50').addclass('disabled');         }     }) }); 

works fine here.

how markup differ example above?


Comments