Page 1 of 1

onmouseover()

Posted: Mon Aug 13, 2007 1:16 am
by rash28
How to hide the orange tooltip. It should be displayed only when mouse over the text in li

Code: Select all

 <style type="text/css">
.roundcont {
        width: 250px;
        background-color: #f90;
        color: #fff;
}
.roundcont p {
        margin: 0 10px;
}
.roundtop {
        background: url(tr.gif) no-repeat top right;
}
.roundbottom {
        background: url(br.gif) no-repeat top right;
}
img.corner {
   width: 15px;
   height: 15px;
   border: none;
   display: block !important;
}

</style>

Code: Select all

<script>
function showdiv(){
var tip;
tip = document.getElementById("one");
tip.style.display ="block";
}

function hidediv(){
var tip;
tip = document.getElementById("one");
tip.style.display ="none";
}

</script>



Code: Select all

<div id="one">
<li onMouseOver="javascript:showdiv(); onMouseOut="hidediv();>--Somename
<div class="roundcont">
   <div class="roundtop">
         <img src="tl.gif" width="15" height="15" class="corner"  style="display: none" />
   </div>

<p> On mouse over</p>
      <div class="roundbottom">
         <img src="bl.gif" width="15" height="15" class="corner" style="display: none" />
      </div>
   </div>
 </li>
</div>
</div>

Posted: Mon Aug 13, 2007 5:13 am
by superdezign
Firstly, your question is uninformative, and is basically asking us to decipher what you're doing and write your code for you. That's a no-no. Be more descriptive.

What on earth is that even doing? What is div#one?

Posted: Sat Aug 18, 2007 2:28 am
by RhapX
superdezign wrote:Firstly, your question is uninformative, and is basically asking us to decipher what you're doing and write your code for you. That's a no-no. Be more descriptive.

What on earth is that even doing? What is div#one?
Completely agree. If you were more informative, maybe we could help. Also, learn how to use proper tags. You're using an LI when there isn't even a UL.

One more thing, less <div>'s

Posted: Sat Aug 18, 2007 7:41 am
by miro_igov
<li onMouseOver="javascript:showdiv(); onMouseOut="hidediv();>

Must be:

<li onMouseOver="showdiv();" onMouseOut="hidediv();">