jrottman
Programmer
- Jun 17, 2005
- 47
I am working on a small app. And I have ran into an issue. How can I hide the current div that is being displayed when I click on a link, and load the new div.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<div id="div_one">This is some text in div 1</div>
<a href="javascript:document.getElementById('div_one').style.display = 'none';document.getElementById('div_two').style.display = 'block';">Click for next...</a>
<div id="div_two" style="display:none;">This is some more text in div 2</div>
<div id="div_one">This is some text in div 1</div>
<a [COLOR=red]href="#" onclick=[/color]"javascript:document.getElementById('div_one').style.display = 'none';document.getElementById('div_two').style.display = 'block'">Click for next...</a>
<div id="div_two" style="display:none;">This is some more text in div 2</div>
<a href="?showdiv=2" onclick="document.getElementById('div_one').style.display = 'none';document.getElementById('div_two').style.display = 'block';return false;">Click for next...</a>