79395209

Date: 2025-01-28 21:24:28
Score: 0.5
Natty:
Report link

The simple answer would be as follow

In window.onload, "onload" is a method that invokes the function as soon as the whole page is ready to process the code. the function will only invoked after the whole page including other js/css/media files has been loaded properly then window.onload function fires and executes the code written in the method.

In $(document).ready() "ready" is a jQuery method that is used to invoke a function as soon as the DOM(document object model) is ready irrespective of whether images, CSS, or other asset files are loaded or not.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mitesh vaghela