Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

pakl

BusinessGreen
  • Posts

    25
  • Joined

  • Last visited

Community Answers

  1. pakl's post in Draggable: jQuery.empty() does not work when div is draggable was marked as the answer   
    Thanks for the input. For what it's worth, here is the hack I used to get around this issue without having to touch my code base too much:
    (function () { var originalEmpty = jQuery.fn.empty; jQuery.fn.empty = function () { var draggable = Draggable.get(this); if (draggable != null) { draggable.kill(); } return originalEmpty.apply(this, arguments); }; })(); It just overrides the jQuery.empty method, checks for a draggable and kills it before calling the original empty logic of jQuery.
    Seems to work fine so far. Obviously this is a hack very specific to how I use both jQuery and draggable in this project.
     
    I just haven't ever encountered any issues with empty before so was suspecting draggable of doing something unusual here.
×