This article will show you how you can user jQuery $( document ).ready() function in your application to execute jQuery code on page load.
WAY 1:
WAY 2:
In this i will show the short hand
WAY 1:
$(document).ready(function () {
alert("This is document.ready function.");
});
|
$(function () {
alert("This is document.ready function.");
});
|
WAY 3:
Calling a function in ready
Calling a function in ready
function
YourReadyFunction(jQuery) {
alert("This is document.ready function.");
}
$(document).ready(YourReadyFunction);
// or:
$(window).load(YourReadyFunction);
|
0 comments:
Please let me know your view