I'm wondering what's faster, using livequery or live with draggables
and droppables. I've been using livequery but as I just upgraded to
jquery 1.3.2 and ui 1.7 I thought I would try live instead. I'm using
these because the page with the draggables are loaded through ajax and
needs to be reactivated somehow.
This is how the code looks like basically:
$('#div #div_list').live('mouseover', function() {
$('.panel').draggable({
appendTo: 'body',
helper: 'clone'
});
$('.panel-off').draggable('disable');
$('.jdrop').droppable({
accept: '.panel',
activeClass: 'jdrop-active',
hoverClass: 'jdrop-hover',
tolerance: 'intersect',
drop: function(ev, ui) {
// a bit of code chopped out
}
});
});
This works as intended although it's a bit choppy/laggy especially
with when there are more panels to drag and drop (only tried Firefox
3.0.7), and using the same code with livequery also works:
$('#div #div_list').livequery(function(event) {
// same code as above
});
Is this the "best way" of doing things? Is it prefered to use live
instead of livequery?
Any suggestions are welcome! Thanks!
Regards,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---