peekABar - jQuery 通知栏插件
MIT
跨平台
JavaScript
软件简介
peekABar 可以创建带有很多定制化选项的通知栏 jQuery 插件。示例代码:
// 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.'
});