swaggerking
asked on
Make div disappear after a few seconds
I'm using the following script that displays a div for a few seconds and then it disappears. I would like it to ease away more gracefully than the current script I'm using. Can this be done in Jquery and if so, how can I apply it to the following code.
<script type="text/javascript">
// close the div in 5 secs
window.setTimeout("closeHe lpDiv();", 5000);
function closeHelpDiv(){
document.getElementById("h elpdiv").s tyle.displ ay=" none";
}
</script>
<%
If Request.QueryString("Updat e")="Succe ss" Then
%>
<div id="helpdiv" class="corners">
<img src="../images/Icons/chang es_saved.p ng" width="171" height="50"/>
</div>
<%end if
%>
<script type="text/javascript">
// close the div in 5 secs
window.setTimeout("closeHe
function closeHelpDiv(){
document.getElementById("h
}
</script>
<%
If Request.QueryString("Updat
%>
<div id="helpdiv" class="corners">
<img src="../images/Icons/chang
</div>
<%end if
%>
ASKER
kadaba:
Is this what you mean?
<script type="text/javascript">
// close the div in 5 secs
window.setTimeout("closeHe lpDiv();", 8000);
function closeHelpDiv(){
$("helpdiv").hide('slow');
}
</script>
If so, it now not disappearing at all.
Is this what you mean?
<script type="text/javascript">
// close the div in 5 secs
window.setTimeout("closeHe
function closeHelpDiv(){
$("helpdiv").hide('slow');
}
</script>
If so, it now not disappearing at all.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked like a charm. Much appreciation!
instead
$("helpdiv").hide('slow');