Reputation: 325
I am using a program that requires jQuery 1.3.2 and haven't been able to get the .click()
function to work, but I am able to get function like .hover()
to work.
This works fine:
$(document).ready(function() {
$("#alert_button").hover(function(){
alert("The monitor has been notified - please wait in your room and they will be by shortly");
});
});
But this does not:
$(document).ready(function() {
$("#alert_button").click(function(){
alert("The monitor has been notified - please wait in your room and they will be by shortly");
});
});
Did 1.3.2 not support .click()
? And if not was there an alternative event handler to use?
Upvotes: 0
Views: 1723
Reputation: 65
$('#register').bind('click', function () { $('#register_form').submit(); });
Upvotes: -1
Reputation: 41
Update your jQuery to 2.03 and change .click to .on('click', function...
Your version is very old, and have many deprecated code.
Upvotes: -1
Reputation: 206505
.click()
will work in any case... demo
Rather, .hover()
will not work in Chrome for action
elements like <button>
demo
If you're fine with the above mentioned than your error lies somewhere else,
open Firebug or any Developer console and see if you have some other JS errors.
Upvotes: 0