JQuery Is Not Working In Firefox
jQuery is not working in Firefox. It works fine in IE and Google chrome, but when I am trying to run my application in Mozilla Firefox jQuery is not working. Any guesses? Here is m
Solution 1:
you should use the dom ready event
$(document).ready(function(){
$('div').click(function(){
alert("Hello.....");
});
});
Solution 2:
Put your jquery Code inside document.ready
.
$(document).ready(function() {
$('div').click(function(){
alert("Hello.....");
});
});
Give your div a proper class.just like
<div class="clsDiv"> One</div>
amd call like this.
$('.clsDiv').click(function(){
Solution 3:
lukenz and Shree nailed it. JQUery event handlers for html elements must first be registered in $(document).ready().
Post a Comment for "JQuery Is Not Working In Firefox"