vicoders-notify

1.0.6 • Public • Published

Note: The plugin dependencies jquery, fontawesome.

If you use webpack, please add these code to webpack.config.js

plugins: [
    new webpack.ProvidePlugin({
       $: "jquery",
       jQuery: "jquery"
   })
]

Usage:

Add CSS file

<link rel="stylesheet" type="text/css" href="./node_modules/vicoders-notify/assets/css/notify.min.css">

Parameters

function notify(type, content, time, scroll_top, close_callback) { }

type

String. Default: success.

Type of notify.

content

String.

Content of notify.

time

Integer. Default: infinite.

Time auto hide of notify.

scroll_top

Boolean. Default: false.

close_callback

Function

To call a success notify

import { notify } from '../node_modules/vicoders-notify/assets/js/notify.js';
$(document).ready(function() {
    notify('success', 'Successfully!');
});

Or you can call a warning notify with timeout is 5 seconds

import { notify } from '../node_modules/vicoders-notify/assets/js/notify.js';
$(document).ready(function() {
    notify('warning', 'Warning!', 5000);
});

Readme

Keywords

none

Package Sidebar

Install

npm i vicoders-notify

Weekly Downloads

2

Version

1.0.6

License

ISC

Last publish

Collaborators

  • dunghoang103
  • nightfury
  • lebaotrung
  • khanhvuht