I know that .live() is now deprecated but I cannot seem to change it and keep the functionality.
I just have a quick question about the .on() function in jQuery. I'm currently using .live() here
Like so:
$('table tr th').live("click", function() {
});
But, when I try and replace .live() with .on() it no longer works as it's supposed to.
I've tried putting in
$('table tr th').on("click", function() {
});
as well as
$('table tr').live("click", "th", function() {
});
and
$('table tr').delegate("th", "click", function() {
});
but to no avail.
Why is this and what steps can I take to make it work properly?