View Full Version : could u xplain this for me
chows2k4
12-16-2004, 03:05 PM
http://www.siteexperts.com/tips/styles/ts16/page1.asp
please go to this page and there is info regarding showing and hiding contents in a webpage. read that and please explian me. i'm not able to get where should i place what script exactly. so, please do that for me. i would be grateful.
thank u
try pasting this code into your page, see if it's what you're looking for..
<script type="text/javascript">
window.onload = function() { document.getElementById('hideable').style.display = 'block'; }
function toggle(link, divid) {
var div = document.getElementById(divid);
if (div.style.display == 'none') {
div.style.display = 'block';
link.innerHTML = 'Click to Hide';
} else {
div.style.display = 'none';
link.innerHTML = 'Click to Show';
}
}
</script>
</head>
<body>
<a href="#hideable" onclick="toggle(this, 'hideable'); return false;">Click to Hide</a><br><br>
<div id="hideable">
Put your content here
</div>
</body>
</html>
shwaza
12-17-2004, 12:58 AM
^
| that looks pretty good, i think basically its just a javascript function that is triggered by the event of your choice, onmouseover, onclick etc. that swaps some text for other text
That's pretty much all it is, shwaza, you just have to make sure to give them the correct ID's.
undacuvabruva
12-17-2004, 01:07 PM
Java Script
I THINK they have a script for it at http://www.spoono.com
but i'm not sure. I think my friend got his from there
I've been wondering this too. Thanks for this explanation, tho JS seems to be a bit complex...
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.