I am using jQuery to select and pop an alert when user click button.
The below code works on ‘standard’ browsers (Chrome, Firefox, etc), but IE 6 fails.
$('input[type="submit"]').click(function(event) {event.preventDefault();});
$('input[type="submit"]').click(function() {alert('hi')});
Looks like jQuery selector of such input won’t work in IE 6. How can I make it compatible for IE 6 as well?
You can assign your buttons a class and then reference with that.
EDIT: this code works for me in IE6: