New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jquery-noti5

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-noti5

jQuery notication plugin

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Noti5

jQuery notication plugin

Prerequisites

jQuery library

Installing

  • NPM: https://www.npmjs.com/package/jquery-noti5

Options

DescriptionDefault
titleThe title of noti5
messageThe content of noti5
typeThe type of noti5, namely info, success, warn and dangerinfo
timeoutThe duration of noti5 in second4
posThe global position of the noti5. It includes top-left, top-center, top-right, bottom-left, bottom-center, and bottom-righttop-right
elementPosThe element position of the noti5: top, bottom, left or rightright
linkThe target link object container href, title and target when noti5 is being clicked{href: '#' title: '', target: '_blank'}
offsetThe offset of noti5. It takes either a single number or an object including x and y value0
spacingThe spacing between each noti5 containers5
showCloseBtnA boolean value to determine a close button is shown or nottrue

Default option overiew

{
    'title': '',
    'message': '',
    'type': 'info',
    'timeout': 4,
    'pos': 'top-right',
    'elementPos': 'right',
    'link': {
        'href': '#',
        'title': '',
        'target': '_blank'
    },
    'offset': 0, 
    // or
    // 'offset': {
    //   'x': 0,
    //   'y': 0
    //}
    'spacing': 5,
    'showCloseBtn': true
}

Usages

HTML:

<div class="foo"></div>

JavaScript:

$('.foo').noti5();

Pass a simple message

$('.foo').noti5("Lorem Ipsum");

Pass a custom setting

$('.foo').noti5({
	'title': 'Lorem Ipsum',
    'message': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
	'type': 'info'
});

You can also initialize noti5 without a selector

$.noti5({
	'title': 'Lorem Ipsum',
    'message': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
	'type': 'danger'
});

Methods

You can call the below methods with an noti5 instance

update(obj)

Only title, message, type and link can be updated.

var noti5 = $.noti5({
	'title': 'Lorem Ipsum',
    'message': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
	'type': 'danger'
});

setTimeout(function(){
	noti5.update({
		'title': 'updated title',
		'message': 'updated message',
		'type': 'danger',
		'link': {
			'href': 'https://foo.com',
	 		'title': 'updated title',
	 		'target': '_blank'
		}
	});
}, 3000);

close()

var noti5 = $.noti5({
	'title': 'Lorem Ipsum',
    'message': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
	'type': 'danger'
});

setTimeout(function(){
	noti5.close();
}, 3000);

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Keywords

FAQs

Package last updated on 20 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc