Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 925 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 925 Bytes

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.