Easy Alert Notification Bar Plugin With jQuery EasyNotif - Download Easy Alert Notification Bar Plugin With jQuery - EasyNotif

Download Easy Alert Notification Bar Plugin With jQuery – EasyNotif

Posted on

This time I will share jQuery Plugin and tutorial about Easy Alert Notification Bar Plugin With jQuery – EasyNotif, hope it will help you in programming stack.

Easy Alert Notification Bar Plugin With jQuery EasyNotif - Download Easy Alert Notification Bar Plugin With jQuery - EasyNotif
File Size: 10.4 KB
Views Total: 1780
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

EasyNotif is a really simple jQuery alert plugin which lets you create alert notification bars of various types (default, info, error, warning, success) on the webpage. Click on the notification body to close the notification bars manually.

How to use it:

1. Create a set of notification bars with custom messages as follows:

01 <div class="container">
02    
03   <div  class="easy-notif">
04     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
05   </div>
06   <div  class="easy-notif error">
07     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
08   </div>
09  
10   <div  class="easy-notif info">
11     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
12   </div>
13  
14   <div  class="easy-notif warning">
15     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
16   </div>
17  
18   <div  class="easy-notif success">
19     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
20   </div>
21  
22 </div>

2. Load jQuery library and the jQuery EasyNotif plugin’s script at the bottom of the webpage.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="js/easynotif.js"></script>

3. Call the function to display the notification bars on page load.

1 $('.container').easynotif();

4. You can also create notification bars in the JavaScript as follows:

1 var options ={
2     type: "error",
3     content: "Error message"
4     };
5 $('.container').easynotif(options);

5. The default notification styles. Add the following CSS snippets to the webpage and override & modify the styles to your taste.

01 .easy-notif {
02   position: relative;
03   margin: 1em;
04   background: #F9F9F9;
05   padding: 1em 1em 1em 2em;
06   border-left: 4px solid #DDD;
07   box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125);
08   cursor: pointer;
09 }
10  
11 .easy-notif:before {
12   position: absolute;
13   top: 50%;
14   margin-top: -17px;
15   left: -17px;
16   background-color: #DDD;
17   color: #FFF;
18   width: 30px;
19   height: 30px;
20   border-radius: 100%;
21   text-align: center;
22   line-height: 30px;
23   font-weight: bold;
24   font-family: Georgia;
25   text-shadow: 1px 1px rgba(0, 0, 0, 0.5);
26 }
27  
28 .info { border-color: #0074D9; }
29  
30 .info:before {
31   content: "i";
32   background-color: #0074D9;
33 }
34  
35 .success { border-color: #2ECC40; }
36  
37 .success:before {
38   content: "√";
39   background-color: #2ECC40;
40 }
41  
42 .warning { border-color: #FFDC00; }
43  
44 .warning:before {
45   content: "!";
46   background-color: #FFDC00;
47 }
48  
49 .error { border-color: #FF4136; }
50  
51 .error:before {
52   content: "X";
53   background-color: #FF4136;
54 }

Change log:

2017-02-07

  • updating some lines

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

source : jqueryscript.net