Possible Duplicate:
jQuery 1.7 - Turning live() into on()
.live() vs .on() method
I have the following code (which I've simplified for this) which worked fine alongside jquery-1.7.
$("td.ui-datepicker-week-col a").live("click", function () {
alert("hello");
});
I'm trying to upgrade my code though so I can upgrade my jQuery pack version so I've changed it to this.
$("td.ui-datepicker-week-col").on("click", "a", function () {
alert("hello");
});
This doesn't do anything though. It doesn't throw any errors either so I can't see where the problem is.
Any ideas?