The function below shows the notification bar when a user visits a page. The toolbar slides down from the top of the window, discarding the contents of the page.
This is normal, but the effect becomes annoying when you visit more pages. What I'm trying to accomplish: slide the notification bar only the first time a user interacts with the site. After the notification is first displayed, if the user refreshes the page or visits other pages of the site, the notification bar is displayed instantly without a sliding effect.
I should probably use SessionStorage for this, just not quite right.
$(function(){
$('#notification_toolbar').slideDown();
});
source
share