Giter VIP home page Giter VIP logo

easynotify's Introduction

Installation

Include script after the jQuery library:

<script src="easyNotify.js"></script>

Usage

Basic setup:

<div id="easyNotify"></div>  <!-- HTML -->
$("#easyNotify").easyNotify(); // JS

Options can be pass by object like:

var options = {
      title: "Notificação",
      options: {
        body: "O melhor do Brasil são os Brasileiros.",
        icon: "icon.png",
        lang: 'pt-BR',
      }
    };

$("#easyNotify").easyNotify(options);

Functions can be pass by param to run on methods like onclose

var myCloseInfo = function(){
    alert('this is a callback function that runs after close the notification.');
};

var options = {
      title: "Notificação",
      options: {
        body: "O melhor do Brasil são os Brasileiros.",
        icon: "icon.png",
        lang: 'pt-BR',
        onClose: myCloseInfo
      }
    };

$("#easyNotify").easyNotify(options);

Demo

easyNotify

Author

Gabriel Rodrigues

easynotify's People

Contributors

gabrielr47 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

easynotify's Issues

html en notificación

Hola, quiero saber como puedo hacer para que las notificaciones acepte HTML ya que si en la opción body se le coloca lo siguente
body: 'Este es el <b>cuerpo</b>'
y lo que muestra es esto
Este es el <b>cuerpo</b>

Not able to set duration to stay notification at screen

Hi Sir, I'm using your library called easyNotify. I really love it and I just have one issue now. Is there a way to set notification duration to stay at screen. currently it has auto time set. I need your help sir. please guide

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.