I have a js file that is loaded for all pages which contains a popup dialog function:
$(document).ready(function() {
$('a.popup').on('click', function(e) {
alert('Show Dialog');
});
});
This is working when the page is first loaded. However when an object element is udated using:
$(this).html(data);
It seems the a.popup event is not attached anymore. This problem only occurs in IE7+. It works in chrome, firefox and opera. Anyone know what might be causing the issue and a workaround for it?
Instead of:
Use:
See also: http://api.jquery.com/on/