Tiny jQuery Based JS Alert and Console.log Replacement - window.message

Tiny jQuery Based JS Alert and Console.log Replacement - window.message
File Size: 3.16 KB
Views Total: 579
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

window.message is a jQuery plugin for creating a terminal output box to display non-blocking alert or informative messages in sequence. A great alternative to the default JavaScript window alert method and console.log() API. Also can be implemented as a Vanilla JavaScript plugin without any 3rd dependencies.

How to use it:

1. Place jQuery JavaScript library and the jQuery window.message plugin into the html page.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="jquery.window-message.js"></script>

2. Display a message inside the notification box.

$.Window.message('Hello world');

3. Implement the window.message as a vanilla JavaScript plugin.

<script src="window-message.js"></script>
// override default options
var defaults = {
    development_mode : true, // developement mode
    height : 200 // initial height
}

// basic
message('Hello world');

// with parameters
message(100, 'Hello world', 'Lorem ipsum dolor sit amet', true);

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