First, as FYI, live is deprecated, you should use .on () as comments above the state.
Secondly, you will not be able to do what you need to do with any script, since these events are not baked into on (). Therefore, the way I would like to approach it is to bind your event inside the function:
function doDraggable() { $(".draggable").draggable({ containment: [0, finalHeight, 0, 0], scroll: false}); }
Then initialize it when the document is ready, and also whenever ajax completes:
$(document).ready(function () { doDraggable(); }); $(document).ajaxComplete(function () { doDraggable(); });
You can be more specific than a document selector using the ajaxComplete event so that it doesn't fire for every ajax event, but you get my drift ...
Moby's Stunt Double
source share