Draggable after Ajax
Draggable after Ajax
So I'm pretty much doing this tutorial:
http://yensdesign.com/2008/12/how-to-load-content-via-ajax-in-jquery/
But the new content that's loaded in needs to be draggable. I looked at the stickie post that said Livequery might be able to solve this, but I don't really know how to code it. If Livequery is the way to go with this, could someone help with the syntax, and if it's not, point me in the right direction? Here's my drag function (I can post more of my code, html, etc if necessary):
-
$('#sword, #hat').draggable({
stack: { group: '.window', min: 5},
handle: '.window_bar',
cursor: 'pointer',
start: function() {
$(this).fadeTo(100, 0.5);
},
stop: function() {
$(this).fadeTo(100, 1);
}
});
The #sword and #hat elements are the divs that are supposed to be draggable and are loaded via ajax into a container div.
Thanks!