sahanz
asked on
jQuery .live
Hello,
i was wondering if there is a way to assign sortable to $( "#canvas .widget" ) using live method or such ?
Obviously something like this wont work. $( "#canvas .widget" ).live('sortable', function(){});
Any idea ?
i was wondering if there is a way to assign sortable to $( "#canvas .widget" ) using live method or such ?
$( "#canvas .widget" ).sortable();
Obviously something like this wont work. $( "#canvas .widget" ).live('sortable', function(){});
Any idea ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you need to make it sortable every time the ajax load finishes
check this explanation
http://stackoverflow.com/questions/4323639/jquery-live-and-sortable
check this explanation
http://stackoverflow.com/questions/4323639/jquery-live-and-sortable
ASKER
That's what I thought, the ajax call actually append to #canvas and the ajax load works few times, so that means on each load I have to do the sortable right?
yes
ASKER
Thank you.
ASKER
I have this div
<div id="canvas">
</div>
from an ajax call I load some divs in to this #canvas and those are having a class called "widget"
so after getting these div.widget s I want them to be sortable.