Reputation: 2201
I'm trying to run click event handler using jquery 1.7 by clicking on anchor tag. This code is working fine in firefox, but I'm not able display alert box using same code in IE 10. Could anyone please tell me how to achieve this functionality in internet explorer 10?
$(document).ready(function() {
$('.call-link').on('click', function (ev, evData) {
alert("hello world");
});
});
Upvotes: 3
Views: 783
Reputation: 71
The expected behaviour in IE is that a button or link doesn't fire any events when it's disabled. Your link is disabled. So the event is not getting fired.
Upvotes: 1
Reputation: 3473
It is not calling in IE because the element is disabled.
see: Demo
$(document).ready(function() {
$('.call-link').click(function (ev, evData) {
alert("hello world");
});
});
Upvotes: 6
Reputation: 6938
Try :
$(document).on('click', '.call-link', function (ev, evData) {
alert("hello world");
});
Demo : http://jsbin.com/tucu/1/
Upvotes: 1