Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
jquery.announcement
Advanced tools
Readme
Adds a fixed widget at the bottom of your browser screen to display announcements.
http://baivong.github.io/announcement/
Get the latest release of this plugin on Release page or use the command line:
$ bower install jquery.announcement
$ npm install jquery.announcement
Announcement depends on jQuery. Include Announcement script and stylesheet in your document:
<!-- Add jQuery 1.7+ library -->
<script src="jquery.js" type="text/javascript"></script>
<!-- Add jQuery plugin Announcement -->
<link href="jquery.announcement.css" rel="stylesheet" type="text/css">
<script src="jquery.announcement.js" type="text/javascript"></script>
Create list elements will contain the content you wish to display within the Announcement.
<ul class="newsticker">
<li>News content 1</li>
<li>News content 2</li>
<li>News content n</li>
</ul>
... then in your code do:
$(function() {
$('.newsticker').announcement();
});
Name | Type | Default | Description |
---|---|---|---|
title | String | 'Announcement' | Display after the announcement widget is minimized. |
showToggle | Boolean | true | Display maximize/minimize button. |
showClose | Boolean | false | Display close button. |
autoHide | String, Number | 'auto' | Timer minimizes. Can be numeric or 'auto' . Set 0 to disable. |
autoClose | String, Number | 0 | Timer close. Can be numeric or 'auto' . Set 0 to disable. |
position | String | 'bottom-right' | bottom-left or bottom-right |
width | String, Number | 300 | Width of announcement. Can be numeric or 'auto' . |
height | String, Number | 'auto' | Height of announcement. Can be numeric or 'auto' . |
zIndex | Number | 99999 | Set CSS z-index property of the announcement widget. |
speed | Number | 10 | Slideshow speed in seconds. Set 0 to disable. |
effect | String | 'fading' | fading , zoom-in , zoom-out , rotate-left , rotate-right , move-top , move-right , move-bottom , move-left , skew-top , skew-right , skew-bottom , skew-left , random , shuffle |
Get plugin instance
var instance = $('.newsticker').data('plugin_announcement');
Show announcement according to index
instance.active(0);
Start slideshow
instance.start();
Stop slideshow
instance.stop();
Minimize/maximize Announcement widget
instance.toggle();
Remove Announcement widget
instance.close();
Update size of the widget when window size changes
instance.autoResize();
Get cookie has name is jquery.announcement
instance.getCookie('jquery.announcement');
Set cookie to hide Announcement widget
instance.setCookie('jquery.announcement', 'hidden', 1);
Remove cookie
instance.setCookie('jquery.announcement', '', -1);
Detecting browser supports CSS feature
instance.detectCSSFeature('transform');
jQuery boilerplate team and a bunch of awesome contributors.
MIT License © Zzbaivong
FAQs
Adds a fixed widget at the bottom of your browser screen to display announcements.
The npm package jquery.announcement receives a total of 25 weekly downloads. As such, jquery.announcement popularity was classified as not popular.
We found that jquery.announcement demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.