Toggle stops working after dragging element to sortable
I'm writing a web application, that requires a drag and drop functionality.
The draggable object is pretty big, but it has a minimization button. However, after I drag the object to a sortable element, the minimization button stops working.
Here's the code sample: http://jsfiddle.net/Alvyxaz/u7SdU/
Try clicking on the + sign before you drag the object to sortable, and after.
Any开发者_开发技巧 tips?
Thank you!
I got it to work by using .live
with a click event and toggle()
instead of show/hide.
$('.minmax').live('click', function () {
$(this).siblings().toggle();
});
http://jsfiddle.net/u7SdU/8/
精彩评论