Hi, I was wondering about the performance/memory consumption of something like the following:
$("div").each(function() { $(this).bind('click', function() { alert('clicked'); }); }); I'm creating an anonymous function for every div element rather than passing a generic callback (by name) to the .each() method. Additionally, I'm creating another function for the bind. Is JQuery doing something special or am I correct that calling a callback by name would be better choice? Thanks for the advice, Eric