Problems with jQuery .not() and the draggable ui -


okay, when draggable, given class .ui-draggable , when disabled being draggable .ui-draggable-disabled

i want select items draggable.

i'm using following selector, doesn't seem work. disabled draggable items still doing on hover. ideas why?

$('.ui-draggable').not('.ui-draggable-disabled').hover(function() { // rest of code 

thanks

try:

// selector means "doesn't have", ':not(:has(selector))' $(".ui-draggable:not(:has(.ui-draggable-disabled))").hover(function() { ... 

or:

$('.ui-draggable').not(':has(.ui-draggable-disabled)').hover(function() { 

or test presence of disabled class within hover mouseover/mouseout functions:

$(".ui-draggable").hover(function() {     if(!$(this).hasclass("ui-draggable-disabled")) {         // stuff     } }, function() {     if(!$(this).hasclass("ui-draggable-disabled")) {         // stuff     }    }); 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -