w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Click event not firing the first time a page loads

if .element is class then it should probably be work fine.

But if you are trying to give actual element like <a></a> or <b></b> or <div></div> so :

 $(document).ready(function() { 
     $("div").click(function() { alert("This should work"); }              
 //Work on click on any div in page ( here is no . before div)
 });




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.