I am trying to run my javascript in my asp.net webform page but I am not sure it runs properly because all the elements are not loaded yet. How can I make sure my script is at the very bottom of the page with using jquery? So it can run when the page is loaded?
Share
With pure JavaScript, you can use
Or you can use jQuery’s
readyfunction:Note: jQuery’s ready function fires when the DOM has loaded (unless the browser does not support a dom-ready method), not when the whole page has loaded (images, scripts, etc).