jQuery Tutorial Tutorials - jQuery .ready() method

jQuery .ready() method

The .ready() method in jQuery is used to run the code that need to wait for the DOM is fully loaded.

jQuery .ready() method Syntax

.ready(handler)

$( document ).ready(function() { });
is equivalent to
$(function() { }); // recommended

jQuery .ready() method Example

example

Display a message when the DOM is loaded.

Try now

Date:2019-08-28 10:30:56 From:www.Lautturi.com author:Lautturi