https://github.com/effone/jquery.nok
Yet another full-fledged jQuery notification plugin with bare minimum code.
https://github.com/effone/jquery.nok
jquery minimal notification plugin
Last synced: 3 months ago
JSON representation
Yet another full-fledged jQuery notification plugin with bare minimum code.
- Host: GitHub
- URL: https://github.com/effone/jquery.nok
- Owner: effone
- License: mit
- Created: 2018-01-20T05:52:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-16T19:30:20.000Z (over 4 years ago)
- Last Synced: 2025-03-07T20:18:00.468Z (4 months ago)
- Topics: jquery, minimal, notification, plugin
- Language: JavaScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery.nok
Yet another full-fledged jQuery notification plugin with bare minimum code.
931 bytes only (616 bytes : js, 315 bytes : css## Dependency
Ofcourse, jQuery library. Make sure it is included, else do that first.## Instalation
Include `jquery.nok.min.css` from `dist` folder.
```html```
Include `jquery.nok.min.js` from `dist` folder.
```html```
Thats all. Ready to use.npm?
`npm install jquery.nok`## Fire a nok
```javascript
$.nok({message: "Knock Knock, anyone home?"});
```
Customize?```javascript
$.nok({
message: "OOpSEE!! Mishap!",
type: "error",
stay: 0 // Sticky
});
```## Options
message: '', // The message to display
type: 'info', // Type of message : info / error / success
sticky: false, // Stay or hide after sometimes, bool : DEPRECATED (will be removed in future version)
stay: 4 // Seconds the message stays (since v.1.1.0 set this value to 0 to make sticky)## Note
- Values included under `Options` are defaults. Change those as required.
- If message is blank, nok will not knock (appear).
- Pass a second value in number only else the nok will be sticky.
- Click on a sticky nok to dismiss. Simple as that.
## Version History:
1.1.0 : <2018.08.20>
- Deprecate option `sticky`, replaced by `{stay: 0}`1.0.1 : <2018.08.20>
- Added SASS Partial
- Code Cleanup1.0.0 : <2018.01.20>
- Initial Stable Release