The script works perfect both in Firefox and Opera.
$(document).ready(function()
{
$('#mainTable tr').each(function()
{
$(this).on("click",( function ()
{
alert("Test");
}));
});
});
No alert in IE (Version 9).
I have looked around, and it seems like a common problem, but I couldn’t find any solution.
EDIT:
Here is a test link for fiddle:
http://jsfiddle.net/BH6Us/
Thanks.
you don’t need
each, that doesn’t work because the handler is within the each function, which is called only once, in fact each should be called first for triggeringclickfunction.