Reputation: 658
In my script i have 2 buttons, one in order to enable the draggable and the another to disable it. Here is how ive done this
$('#Enable').click(function(){
$("#sortable li").draggable({
disabled : false
});
});
$('#Disable').click(function(){
$("#sortable li").draggable({
disabled : true
});
});
My problem is that when i disable the draggable feature, all my elements are fading out a little bit. Is there any way to prevent this fading out every time i disable the draggable? Here is my code in jsFiddle
Upvotes: 2
Views: 2360
Reputation: 1383
The styling when disabled
comes from the jQueryUI's CSS.
Simply add this to your css:
li.ui-state-disabled.ui-draggable-disabled { opacity : 1;}
Example: http://jsfiddle.net/5KrAv/
Upvotes: 6