how to hide div content after some interval using jquery?

Auto hid Div

File name : index.php

<html>
<head>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<!-- <script type="text/javascript">
setTimeout(function() {
$('#successMessage').fadeOut('fast');
}, 3000); // <-- time in milliseconds
</script>
//-->

<script type="text/javascript">

function hideYourDiv() {
$("div#successMessage").hide();
}
var theTimeout = setTimeout(hideYourDiv, 2000);
$("div#successMessage").mouseover(function() {
clearTimeout(theTimeout);
});
</script>

</head>
<body>

<div id="successMessage">Data inserted successfully</div>
</body>
</html>





Previous Next


Trending Tutorials




Review & Rating

0.0 / 5

0 Review

5
(0)

4
(0)

3
(0)

2
(0)

1
(0)

Write Review Here