sticky notification banner - Free Download Sticky Notification Bar In jQuery - notificationBanner

Free Download Sticky Notification Bar In jQuery – notificationBanner

Posted on

This time I will share jQuery Plugin and tutorial about Sticky Notification Bar In jQuery – notificationBanner, hope it will help you in programming stack.

sticky notification banner - Free Download Sticky Notification Bar In jQuery - notificationBanner
File Size: 5.1 KB
Views Total: 2407
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

notificationBanner is a small (less than 1kb) yet configurable jQuery plugin to create banner-style notification bars that will be fixed on the top or bottom of the webpage.

Smooth & performant slide in/out animations based on CSS3 transition and transform properties.

Ideal for informational messages, cookies/GRPR notices, discount information, etc.

How to use it:

1. Insert the minified version of the notificationBanner plugin after loading jQuery library (slim build is recommended).

2         integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
3         crossorigin="anonymous">
4 </script>
5 <script src="src/jquery.notificationbanner.min.js"></script>

2. Create an empty container to place the notification bar.

1 <div class="myNotice"></div>

3. The JavaScript (jQuery script) to create a basic notification bar displayed at the bottom of the webpage.

1 var notification = $('.myNotice').notificationBanner({
2     text: "A Default <a href="https://www.jqueryscript.net/tags.php?/Notification/">Notification</a> Bar"
3 });

4. Stick the notification bar to the top of the webpage.

1 var notification = $('.myNotice').notificationBanner({
2     text: "A Default Notification Bar",
3     position: "top"
4 });

5. The plugin also supports HTML content in the notification bar. For example, you can insert a custom action button inside the notification bar.

1 var notification = $('.myNotice').notificationBanner({
2     text: "Notification Bar <button>CTA Button</button> <script></script>"
3 });

6. Customize the appearance (height, width, padding, background color) of the notification bar.

1 var notification = $('.myNotice').notificationBanner({
2     height: "20px",
3     padding: "10px",
4     background: "#7ee68b",
5     width: "100%"
6 });

This awesome jQuery plugin is developed by MANOJMANI07. For more Advanced Usages, please check the demo page or visit the official website.

source : jquery.net