I have two handlers for the mouseover function, I would like to know what the difference is and how to use each of them in the most efficient way.
The code block is one:
$('.test div').mouseover(function() {
$(this).stop().animate({
left: '100px'
}, 550);
});
Code block two:
$('.test').delegate('div', 'mouseover', function() {
$(this).stop().animate({
left: '100px'
}, 550);
});
Thanks in advance:)
source
share