jQuery How to Check a page loaded fully
- Article
- Comment
jQuery how to check a page loaded fully. We have to show some animations or images before the page completely rendered. For that, we have to a jQuery function to check whether the page is loaded or not. There are two options here. when you want to check whether a page is ready. you can use ready()
function. And if you want to check whether the page loaded completely, you can use window.location();
function to load. Here is an example for each method.
$(window).load(function() { //When your page is loaded and ready to use. })
This one describes you to use optimally. It runs after the window is loaded completely. The following one is DOM
ready event.
$( document ).ready(function() { // dom is ready to work. });
Here the DOM ready will work after the document is ready to handle functions. but the window is not loaded completely.