1.0.0 • Published 8 years ago

tb.essage v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Essage

a more elegant way to show message / tips.



72913732-3232-49d1-ac6b-cfcc8035cefd


1. installaion

Place the js/css file on you page, and use the Essage object to manage your message:

<link rel="stylesheet" href="essage.css">
<script src="essage.js"></script>

2. API: show or hide

show(message) show message

// The argument `message` can be html(string).
Essage.show('<b>hello</b>, im a message.');

hide() hide message

Essage.hide();

config: provide configurations

var config = {
  message: 'message body',

  // add class `essage-success` to the container
  // by default, there're 4 status: normal, warning, success, error
  status: 'success',

  // the placement can be `top` or `bottom`, by default is `top`
  placement: 'bottom'

  // duration in ms
  // provide _negative_ number to always show if default duration is set
  duration: 1000
};

Essage.show(config);

default() set default duration

Essage.default({duration: 3000});
Essage.show('message');

3. MIT licence

Licensed under MIT. liccese.txt