Articles → JQUERY → Ready function in jquery

Ready function in jquery






Prerequisite











Introduction











Syntax


		   
  $(document).ready(function() {
//  Add your code here
});



Adding Events in $(document).ready()






		   
  <a href='#' onclick="javascript:alert('this is the click event');">Click Me</a>






		   
  $(document).ready(function() {
    $('a').click(function() {
      	alert("you clicked me!");
    });
});





Posted By  -  Karan Gupta
 
Posted On  -  Monday, October 24, 2011

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250