Code Monkey home page Code Monkey logo

notify-js's Introduction

Notify-js

A simple HTML notification box that slides out and show your message on the right hand side. Require jQuery, browser only.

Screenshot

It also support multiple notification box at the same time.
Screenshot

This is an old project intended for learning JavaScript. No support will be provided. But PR is welcomed. Community Power <3

Basic usage

Download and include the js file in your html.

<script type="text/javascript" src="notification.js"></script>

Show a notifiction

let box = window.notify.showNotification("Your message", {/* options */}); // showNotification returns a jQuery object
// notify.closeNotification(box); // Close it like that

Available options

{
    color:"#ffffffcc", // Background color of the box
    fontColor:"#000000", // Font color of the box
    darkMode:false,
    slideOut:true, // If false, fade effect will be used
    animetionTime:400,
    dismissTime:4000, // If dismiss is true, how long should it wait before closing
    position:"top", // top or bottom
    dismiss:true, // Automaticlly close the notification
    closeOnClick:true, // Close the notification when user click on the box
    onclickFunc:undefined // Callback function when user click on the box
}

notify-js's People

Contributors

reinforcezwei 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.