A minimal jQuery plugin to add a sticky alert bar to the top of your website. Inspired by this pen on CodePen. A demo can be found running at http://sticky.longren.io, which is hosted on GitHub Pages.
jquery.stickyalert.js after including jQuery itself:
yarn add jquery-sticky-alert
npm install jquery-sticky-alert
I usually add this in my
<header> area, after jQuery and
jquery.stickyalert.js have been loaded.
You'll also need a div with id
alert-container, according to the usage example above, at least:
alert-container will contain the sticky alert.
If you nocitce any problems, please submit an issue.
How to Contribute
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request