Can we use the on() function instead of livequery plugin? If it is possible, how can I use the on() here;
$('.layout_block').livequery(function(){
$(this).resizable({
// ...
});
});
Can we use the on() function instead of livequery plugin? If it is possible, how can I use the on() here;
$('.layout_block').livequery(function(){
$(this).resizable({
// ...
});
});
According the documentation you can bind a click event for example.
$('a').livequery('click', function(event) {
// your code
});
Since livequery is designed as a plugin to allow you to add the same event to dynamically added elements, it cannot be replaced with jQuery's default on() function. Otherwise, the plugin should be useless.
So to react on your comment...if you do not need livequery's functionality, do not use it and go for the native on() function.