Articles → JQUERY → Ready Function In Jquery

Ready Function In Jquery






Prerequisite




  1. Hands on experience in creating HTML page.
  2. Basic knowledge of JavaScript.
  3. Basic knowledge of event handling in JavaScript.

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