Skip to content
A clean and simple sticky notification bar with dismiss button.
HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
simple-sticky-bar.html
simple-sticky-bar.js

README.md

simple-sticky-bar

Some times you just need a simple sticky bar at the top or bottom of your site to promote something, which people can click or dismiss. This is it.

This simple sticky bar will appear for site visitors at the top or bottom of their browser window. If the visitor clicks "X" to dismiss the bar, it will go away and stay away forever.

Ideas for usage:

  • Promote upcoming events and webinars.
  • Add a prominent call-to-action throughout your site.
  • Announce new features, news, or products.
  • Greet web visitors obnoxiously.

Pro-tips:

  • Change localStorage to sessionStorage and the bar will reappear with each new session, even after being dismissed.
  • Add the code to a template file to load this bar on every page and for easy editing.

Who made this?

Greg Kogan with help from this tutorial about content gating.

You can’t perform that action at this time.