jquery - What javascript event is tied to "waiting for localhost"? -


i want wait until "waiting localhost" message in browser goes away before running function.

is

$(document).ready(#myfunction)  or  $(window).load( #myfunction ); 

or else?

the first chance run javascript if include in page outside of jquery event callbacks. further page is, sooner run (as it's parsed browser) like...

<html>     <head>         <script type="text/javascript">             alert('running');             //... 

would execute browser has read first few lines server.

it's worth noting there's little point in running javascript there's nothing in dom modify. that's why $(document).ready(); exists - delay script until there's document work with.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -