I know it is best to practice coding to avoid inline javascript, for example:
<img id="the_image" onclick="do_this(true);return false;"/>
I am thinking of switching this kind of thing for jquery click related events, for example:
$("#the_image").bind("click",function(){ do_this(true); return false; });
Will I lose any performance if I tie a ton of click events? I'm not worried about the time it takes to initially bind events, but the response time between the click and its state.
I bet if there is a difference, it is negligible, but I will have a ton of related functions. I am wondering if the browser handles the onclick attribute in the same way as the associated event.
thanks
source share