Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
jquery-peek-a-bar
Advanced tools
A jQuery plugin for a notification bar with a lot of customization options.
Hello all,
Thanks for using this jQuery plugin to show notification bars in your web apps. Your love and support for this plugin is what motivates me to maintain it in an ever-changing world of newer front-end frameworks.
@kunalnagarco/jquery.peekABar
A jQuery plugin for a notification bar with customization options.
npm install jquery-peek-a-bar --save
Use custom HTML as bar text.
Type: String
Default: Your Message Here
Autohide the bar after it is shown.
Type: Boolean
Default: false
Time (in ms) before the bar is hidden if autohide
is true
.
Type: Number
Default: 3000
Add some padding to the bar.
Type: String
Default: 1em
Add a custom background color to the bar.
Type: String
Default: rgb(195, 195, 195)
The way in which the bar reveals itself.
Type: Object
Example:
animation: {
type: 'slide/fade',
duration: 'slow/3000(in ms)'
}
Assign a Custom CSS class to the bar.
Type: String
Default: empty
Change bar opacity.
Type: Number
Default: 1
Where should the bar be revealed? Top or bottom of the page?
Type: String
Default: top
Values: top | bottom
Close the bar by clicking on it.
Type: Boolean
Default: false
Called after the bar is shown.
Called after the bar is hidden.
Show the bar.
Hide the bar.
Please check out the complete example below:
// Create a bar
var bar = $.peekABar({
html: 'Custom Message',
delay: 2000,
autohide: true,
padding: '2em',
backgroundColor: 'rgb(195, 195, 195)',
animation: {
type: 'fade',
duration: '2000'
},
opacity: '0.8',
cssClass: 'custom-class',
position: 'bottom',
closeOnClick: true
onShow: function() {
console.log('called after bar is shown');
},
onHide: function() {
console.log('called after bar is hidden');
}
});
// Show the bar
bar.show();
// Hide the bar
bar.hide();
// Show the bar with custom HTML
// This call will override the HTML
// set in any previous definitions.
bar.show({
html: 'Overrides all, puny human.'
});
For any issues/queries, please open a new Github Issue.
If you like the plugin, please share it with your friends!
FAQs
A jQuery plugin for a notification bar with a lot of customization options.
The npm package jquery-peek-a-bar receives a total of 526 weekly downloads. As such, jquery-peek-a-bar popularity was classified as not popular.
We found that jquery-peek-a-bar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.