Coder Social home page Coder Social logo

essage's Introduction

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

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

auto hide: If timeout {Number} is specific, the message will hide automaticlly after timeout (ms).

// `timeout` should be a number
Essage.show('i willl hide automaticlly after 2 seconds', 2000);

config: And, the message can be an object:

var message = {
  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'
};

Essage.show(message, 3000);
  1. hide() hide message
Essage.hide();

3. MIT licence

Licensed under MIT. liccese.txt

essage's People

Contributors

sofish avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.