Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/myscript/public_html/codes-snippets/config.php on line 6
Jquery Ready Function Example - Jquery

Jquery Ready Function Example - Jquery

How to use ready function in jquery?

Snippet Code


  
Rate this page :
  [ 0 votes]

Jquery ready function will execute after the document is loaded completely. Adding the jquery can help to prevent the conflicts with other javascript frameworks. The sample code for ready function is given below.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script> <script> jQuery(document).ready(function($) { $("#keydown").keydown(function(){ alert("Keydown event is called here!!"); }); }); </script> <div align='center'> Enter Text: <input type='text' id='keydown'> </div>

Tags


Ask Questions

Ask Question