Is it possible to have text that will hide it self behind a link that, when clicked, will reveal the information it hides? If so then how do I do it? Also, can you have a hover effect that gives a description of the text?

Recommended Answers

All 3 Replies

<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	left:116px;
	top:37px;
	width:346px;
	height:257px;
	z-index:1;
}
.style1 {
	font-family: tahoma;
	font-size: 12px;
	color: #990000;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
</head>
<body>
<div class="style1" id="Layer1">
 <p>Is it possible to have text that will hide it self behind a link that, when   clicked, will reveal the information it hides? If so then how do I do it? Also,   can you have a hover effect that gives a description of the text?</p>
 <p>Is it possible to have text that will hide it self behind a link that, when clicked, will reveal the information it hides? If so then how do I do it? Also, can you have a hover effect that gives a description of the text?</p>
 <p>Is it possible to have text that will hide it self behind a link that, when clicked, will reveal the information it hides? If so then how do I do it? Also, can you have a hover effect that gives a description of the text?</p>
</div>
<img src="about_us.jpg" onclick="MM_showHideLayers('Layer1','','hide')" ondblclick="MM_showHideLayers('Layer1','','show')" />
</body>

Hi,
Copy paste these code

thanks but how do you mod it to only show it once?

this code in javascript and HTML
if problem solved mark it solved ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.