viktor
01-02-2012, 08:19 PM
Hey guys,
Is it possible to add a password prompt when using display property with some js to hide/reveal content?
I know it's kind of pointless as the content will be in source code, but I need it for something very basic for a mobile page.
Would really appreciate the help. Here's what I'm using for hide/reveal:
<div id="hideaway" style="display:none;">Here's the hidden content</div>
<a href="javascript:;" onClick="document.getElementById('hideaway').style.display='block';">Reveal hidden content</a>
<a href="javascript:;" onClick="document.getElementById('hideaway').style.display='none';">Hide content again</a>
How can I add password to this? I would really appreciate any help. Thanks.
Is it possible to add a password prompt when using display property with some js to hide/reveal content?
I know it's kind of pointless as the content will be in source code, but I need it for something very basic for a mobile page.
Would really appreciate the help. Here's what I'm using for hide/reveal:
<div id="hideaway" style="display:none;">Here's the hidden content</div>
<a href="javascript:;" onClick="document.getElementById('hideaway').style.display='block';">Reveal hidden content</a>
<a href="javascript:;" onClick="document.getElementById('hideaway').style.display='none';">Hide content again</a>
How can I add password to this? I would really appreciate any help. Thanks.