How to hide div after some specific time using JavaScript
Many times we want to hide a div after some specific time, mainly we use this type of this technique for pop up notification or some particular information div.
Here we use fadeout function to hide the div and here we have set 10 sec for hide or fade the dive
Source Code :-
<html>
<head>
<title>How to hide div after some specific time using JavaScript</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready( function() {
$('#notificationdiv').delay(10000).fadeOut();
});
</script>
</head>
<body>
<div id="notificationdiv" > Hey Friends, If you Like this post then please share it or like our facebook also
https://www.facebook.com/codesol/
</div>
</body>
</html>
Demo
Hey Friends, If you Like this post then please share it or like our facebook also
https://www.facebook.com/codesol/
How to hide div after some specific time using JavaScript
Reviewed by NEERAJ SRIVASTAVA
on
3:13:00 PM
Rating:
No comments: