The difference between assigning event handlers with bind() and each() in jQuery?
can someone tell me what the difference between assigning event handlers using bind(): $(function(){ $('someElement') .bind('mouseover',function(e) { $(this).css({ //change color }); }) .bind('mouseout',function(e) { $(this).css({ //return to previous state }); }) .bind('click',function(e) { $(this).css({ //do smth. }); }) }); and using each() for the same task: $('someElement').each(function(){ $(this).mouseover(function(){$(this).css({/*change color*/}) .mouseout(function(){$(this).css({/*return to previous state*/}); }); }); }); thank you. KyleFarris From the examples you gave, I think you