Minimal Sliding Notification Plugin - jQuery miniNotif

Minimal Sliding Notification Plugin - jQuery miniNotif

miniNotif is an extremely lightweight (1kb) jQuery plugin for creating sliding, non-blocking notification messages with custom text, colors and icons.

1. Import the style sheet miniNotif.css for the basic styling of the notifications.

<link href="miniNotif.css" rel="stylesheet">

2. Import jQuery library and the JavaScript file miniNotif.js into the document.

<script src="https://code.jquery.com/jquery-3.2.1.min.js" 
        integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" 
        crossorigin="anonymous">
</script>
<script src="miniNotif.js"></script>

3. Initialize the miniNotif plugin and we're ready to go.

miniNotif.init();

4. The JavaScript (jQuery script) to display a notification on the webpage. Possible parameters:

  • proccessOrNot: 1 = auto dismiss; 0 = permanent
  • text: Notification message text
  • icon: Notification icon
  • fontcolor: Font color
// miniNotif.addNotif(proccessOrNot, text, icon, fontcolor);
miniNotif.addNotif(1, 'This is a notification message', '!!!', '#222');

5. Override the default styles of the notification messages as per your needs:

#miniNotif .miniNotif {
  background-color : #f1f1f1;
  padding: 10px 20px;
  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  -o-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  filter:progid:DXImageTransform.Microsoft.Shadow(color=#rgba(0, 0, 0, 0.1), Direction=180, Strength=2);
  position: relative;
  max-width: 220px;
  font-size: 18px;
}

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

  • Publication date: 20.12.2017
  • Source

Whoops, looks like something went wrong.

(1/1) ErrorException

file_put_contents(): Only 0 of 244 bytes written, possibly out of free disk space

in Filesystem.php (line 122)
at HandleExceptions->handleError(2, 'file_put_contents(): Only 0 of 244 bytes written, possibly out of free disk space', '/home/p336588/web/ivanovdmitry.com/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 122, array('path' => '/home/p336588/web/ivanovdmitry.com/public_html/storage/framework/sessions/1JwbcbVsrKIQHGSYkI3AnqclR20L35PaxeWpTTTg', 'contents' => 'a:3:{s:6:"_token";s:40:"jElaDWWUUtjRNreKsjuhLdHmlNaVfBR6Ewgu3X60";s:9:"_previous";a:1:{s:3:"url";s:86:"http://ivanovdmitry.com/blog/post/minimal-sliding-notification-plugin-jquery-mininotif";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', 'lock' => true))
at file_put_contents('/home/p336588/web/ivanovdmitry.com/public_html/storage/framework/sessions/1JwbcbVsrKIQHGSYkI3AnqclR20L35PaxeWpTTTg', 'a:3:{s:6:"_token";s:40:"jElaDWWUUtjRNreKsjuhLdHmlNaVfBR6Ewgu3X60";s:9:"_previous";a:1:{s:3:"url";s:86:"http://ivanovdmitry.com/blog/post/minimal-sliding-notification-plugin-jquery-mininotif";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', 2)in Filesystem.php (line 122)
at Filesystem->put('/home/p336588/web/ivanovdmitry.com/public_html/storage/framework/sessions/1JwbcbVsrKIQHGSYkI3AnqclR20L35PaxeWpTTTg', 'a:3:{s:6:"_token";s:40:"jElaDWWUUtjRNreKsjuhLdHmlNaVfBR6Ewgu3X60";s:9:"_previous";a:1:{s:3:"url";s:86:"http://ivanovdmitry.com/blog/post/minimal-sliding-notification-plugin-jquery-mininotif";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', true)in FileSessionHandler.php (line 83)
at FileSessionHandler->write('1JwbcbVsrKIQHGSYkI3AnqclR20L35PaxeWpTTTg', 'a:3:{s:6:"_token";s:40:"jElaDWWUUtjRNreKsjuhLdHmlNaVfBR6Ewgu3X60";s:9:"_previous";a:1:{s:3:"url";s:86:"http://ivanovdmitry.com/blog/post/minimal-sliding-notification-plugin-jquery-mininotif";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}')in Store.php (line 128)
at Store->save()in StartSession.php (line 88)
at StartSession->terminate(object(Request), object(Response))in Kernel.php (line 218)
at Kernel->terminateMiddleware(object(Request), object(Response))in Kernel.php (line 189)
at Kernel->terminate(object(Request), object(Response))in index.php (line 58)