Ready Function In Jquery

on Friday, 11 April 2014

Ready function is execute when the DOM is fully loaded.

.ready()is guaranteed to be executed after the DOM is ready, so this is usually the best place to attach all other event handlers and run other jQuery code. When using scripts that rely on the value of CSS style properties, it's important to reference external stylesheets or embed style elements before referencing the scripts.

Two way writing Ready() method

1.$( document ).ready(function() {
// Handler for .ready() called.
});

2.$(function() {
// Handler for .ready() called.
});

0 comments :

Post a Comment