hi guys,
i'm trying to get a div to fade in and fade out on image mouseover/mouseout, the below code is working for purposes of show/hide the div, but it's instant, and i cannot figure out how to fade. i'm very new to javascript. greatly appreciate any help someone can give me
the following is my code in header:
<script type="text/javascript" language="JavaScript">
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
</script>
the following is my code at the image:
<a onmouseover="ReverseContentDisplay('uniquename'); return true;" onmouseout="javascript:ReverseContentDisplay('uniquename')"><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/layout3_19.gif" /></a></td>
the following is the code at my div:
<div id="uniquename" style="display:none;">
Content goes here.
</div>
i'm trying to get a div to fade in and fade out on image mouseover/mouseout, the below code is working for purposes of show/hide the div, but it's instant, and i cannot figure out how to fade. i'm very new to javascript. greatly appreciate any help someone can give me
the following is my code in header:
<script type="text/javascript" language="JavaScript">
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
</script>
the following is my code at the image:
<a onmouseover="ReverseContentDisplay('uniquename'); return true;" onmouseout="javascript:ReverseContentDisplay('uniquename')"><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/layout3_19.gif" /></a></td>
the following is the code at my div:
<div id="uniquename" style="display:none;">
Content goes here.
</div>