View Full Version : On click description?
Jon101
05-07-2007, 06:58 PM
Looking for a script that works something like..
When you click on a link, words drop down under it... something like "read more" and then when you click it, a description would drop under it.
Thanks!!
thetestingsite
05-08-2007, 02:45 AM
In the had of the document, place this:
<script type="text/javascript">
function showHide(item) {
var obj = document.getElementById(item);
if (obj.style.display == "none") {
obj.style.display = 'block';
}
else {
obj.style.display = 'none';
}
}
</script>
Then in the body of the page (where you want the div to show up), place this:
<a href="index.html" onclick="showHide('theDiv'); return false;">Show/Hide Div</a>
<div id="theDiv" style="display: none;">Text that is hidden until the above link is clicked.</div>
Hope this helps to get you started.
Jon101
05-08-2007, 11:46 AM
Thanks for the response. I'll check it out as soon as I can.
Jon101
05-08-2007, 01:57 PM
Works like a charm!!
Thanks!!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.