2
Reply

When does $document.ready function called in web page?

Madhanmohan Devarajan

Madhanmohan Devarajan

Sep 29, 2016
305
0

    $(document).ready(function(){// ... });This itself states that is a function to be called when the DOM (document) is ready to be rendered. This does not wait for content / page to be loaded. In order to run a function after window / page content is loaded, you need to use $(window).load(function(){});document ready function can be written multiple times with various functions or executions inside it, However, window load function can only be written once.

    Ajit Kayastha
    October 07, 2017
    0

    This function is called once the web page is completely loaded and the DOM is ready (all the objects in the page is ready).

    Madhanmohan Devarajan
    September 29, 2016
    0