javascript - What is the fastest way to auto open hash tab on page load? -


i want open hash #home automatically on page load. tried

<body onload=window.location='#home'> 

js way:

<html>     <head>     <script type="text/javascript">     function load()     {     window.location.href = "#home";      }     </script>     </head>      <body onload="load()">     <h1>hello world!</h1>     </body>     </html>  

and html redirect

   <meta http-equiv="refresh" content="0; url=#home" /> 

all ways slow (about 2-3 sec. redirect after page load). there better (faster) way automatically open #home on page load?

do this:

<body onload="window.location.hash='home'"> 

i think fastest way.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -