jQuery(document).ready(function($){
setTimeout(function() {
$('#div-to-remove').fadeOut('slow',function(){
$('#div-to-remove').remove();
});
}, 5000);
});
In this example, the div with id ‘div-to-remove’, will be faded out and removed in 5 seconds.
गुगलको बेलुन इन्टरनेट
3 hours ago




3 comments:
but after refreshing the page it'l display again ? how to remove it or hide after a certain time.
actually i am building a news site. i created a breaking news section called # "prime_news" i want to show it only for few hours after publish the post. like this http://www.firstpost.com/
@Yash MistreyTo show it for few hours, I think you need to use cookies to save first displayed time and check that time to display later. On the other hand why dont you try server side to display news?
i want once it is removed after 5 second then it will never show again.
Post a Comment