🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

window.message is a jQuery plugin for creating a terminal output box to display non-blocking alert or informative messages in sequence.

alert console-log

Documentation

window.message

Simple replacement for window.alert
Live demo here: http://alterebro.github.io/window.message/

Simple window.alert() replacement both as jQuery plugin and Vanilla JavaScript implementation. console.log and window.alert alternative to display messages in case you want them to be seen within the document.

Usage instructions

Plain JavaScript implementation

  • Include the window.message file
<script type="text/javascript" src="window-message.js"></script>
  • Set the defaults
var defaults = { 	development_mode : true, // set to false when messages are no needed anymore 	height : 200 // initial height of the output message window }
  • Start sending messages to the output message window
message('Hello world'); // outputs : Hello world
  • You can send multiple messages by passing more arguments to the function
message(100, 'Hello world', 'Lorem ipsum dolor sit amet', true); /* output :  --- 100 Hello world Lorem ipsum dolor sit amet true	 --- */	

jQuery Plugin

  • Include both the jquery library and the window.message plugin file:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="jquery.window-message.min.js"></script>
  • Start sending messages as follows:
$.Window.message('Hello world'); // outputs : Hello world


You May Also Like