JQuery


Diffrence between $(document).ready(function(){}) and $(document).onload(function(){})

1 comment:

  1. Their is mainly two differences
    1.HTML Page can contain multiple $(document).ready(function(){}) but we cannot use $(document).onload(function(){}) more than one.

    2.$(document).ready(function(){}) run when dom is ready.
    $(document).onload(function(){}) run when all the event defined on the Dom is bind.

    ReplyDelete