 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
stilekid007
Joined: 15 Apr 2005 Posts: 7
|
Posted: Sat Apr 16, 2005 8:38 am Show and Hide functions |
|
|
|
Hello there everyone!
I have a slite problem with my code below... See I want a code that will do something similar to the code below except instead of showing the text only when the user mouses over the "mouse over link" I want it to automatically popup the text and then hide the text after ten seconds and then popup the text after an other ten seconds and then hide it and so on...
I have been trying to figure it out but I am such a code newbie I couldn't get it.. I would appreciate any comments anyone may have!
Thank you and have a great day! (The show and hide code is below)
| Code: |
<html>
<head>
<title>:::show.hide:::</title>
<script type="text/javascript">
<!--
function ShowHide(id, visibility) {
obj = document.getElementsByTagName("div");
obj[id].style.visibility = visibility;
}
//-->
</script>
<style type="text/css">
<!--
#sub1Div
{
visibility:hidden;
width:80px;
height:80px;
position:absolute;
left:200px;
top:20px;
border:1px solid #151515;
}
#sub2Div
{
visibility:hidden;
width:80px;
height:80px;
position:absolute;
left:200px;
top:105px;
border:1px solid #151515;
}
#sub3Div
{
visibility:hidden;
width:80px;
height:80px;
position:absolute;
left:200px;
top:190px;
border:1px solid #151515;
}
-->
</style>
</head>
<body>
<div id="sub1Div"> sub1</div>
<div id="sub2Div"> sub2</div>
<div id="sub3Div"> sub3</div>
<p>onclick-method</p>
<p>
<a href="javascript:ShowHide('sub1Div','visible')">show.sub1</a> |
<a href="javascript:ShowHide('sub1Div','hidden')">hide.sub1</a>
</p>
<p>
<a href="javascript:ShowHide('sub2Div','visible')">show.sub2</a> |
<a href="javascript:ShowHide('sub2Div','hidden')">hide.sub2</a>
</p>
<p>
<a href="javascript:ShowHide('sub3Div','visible')">show.sub3</a> |
<a href="javascript:ShowHide('sub3Div','hidden')">hide.sub3</a>
</p>
<p>onmouseover-method</p>
<p>
<a href="javascript:ShowHide('sub1Div','visible')"
onmouseover="ShowHide('sub1Div','visible')"
onmouseout="ShowHide('sub1Div','hidden')">
showhide.sub1
</a>
</p>
<p>
<a href="javascript:ShowHide('sub2Div','visible')"
onmouseover="ShowHide('sub2Div','visible')"
onmouseout="ShowHide('sub2Div','hidden')">
showhide.sub2
</a>
</p>
<p>
<a href="javascript:ShowHide('sub3Div','visible')"
onmouseover="ShowHide('sub3Div','visible')"
onmouseout="ShowHide('sub3Div','hidden')">
showhide.sub3
</a>
</p>
</body>
</html>
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|