How do I create a link that goes nowhere and does nothing (from a href perspective)? The purpose is simply to provide clickable text that will toggle a div's display between 'none' and 'block' via a js function.
I have tried href="" which works, but changes focus to another window after being clicked. (Kind of like alt+tab). I have also tried href="#" but this takes you back to the top of the page.
If there is no way to do it through an anchor link, I can fabricate one with a span but would prefer the prior
Any suggestions?
-Geates
[/code]
"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom
"I do not offer answers, only considerations."
- Geates's Disclaimer
I have tried href="" which works, but changes focus to another window after being clicked. (Kind of like alt+tab). I have also tried href="#" but this takes you back to the top of the page.
If there is no way to do it through an anchor link, I can fabricate one with a span but would prefer the prior
Code:
<span style="text-decoration: underline;" onClick="toggleDisplay('text1');">Link</span>
Any suggestions?
-Geates
[/code]
"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom
"I do not offer answers, only considerations."
- Geates's Disclaimer