View Full Version : Jumping to Top..
MrCraig
26-12-2007, 08:23 PM
Does anyone know how to make it so that when i do.
<a href="#" onclick="loadit('index.php');">Click</a>
It doesnt scroll to the top of the page?
(I dont want to use <a href="javascript:loadit('index.php');">Click</a>)
Does anyone know how to make it so that when i do.
<a href="#" onclick="loadit('index.php');">Click</a>
It doesnt scroll to the top of the page?
(I dont want to use <a href="javascript:loadit('index.php');">Click</a>)
Its because your going to #, which is a span id for nothing. If you have like <span id="hello">YO</span> typed in #hello it would go to the text YO.
MrCraig
26-12-2007, 09:06 PM
i know..
Im asking if anyone knows how to stop it jumping to the id.
You cant...
Edit:
btw, you dont have to use a href. You could just do an id and in css make the cursor the same as if hovering over a link.
MrCraig
26-12-2007, 09:08 PM
would
<a href="javascript:void(0)">Click</a>
work? (ie the void wouldnt interrupt the onclick attrb.?)
would
<a href="javascript:void(0)">Click</a>
work? (ie the void wouldnt interrupt the onclick attrb.?)
Dont know actually, try it.
MrCraig
26-12-2007, 09:23 PM
Dont know actually, try it.
Its working fine :)
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.