npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

jquery.announcement

v1.3.0

Published

Adds a fixed widget at the bottom of your browser screen to display announcements.

Downloads

21

Readme

jQuery plugin Announcement

Adds a fixed widget at the bottom of your browser screen to display announcements.

Screenshot

Demo

http://baivong.github.io/announcement/

Installation

Get the latest release of this plugin on Release page or use the command line:

Bower

$ bower install jquery.announcement

npm

$ npm install jquery.announcement

Usage

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();
});

Configuration

| 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 |

Publish method

Get plugin instance

var instance = $('.newsticker').data('plugin_announcement');

.active(index)

Show announcement according to index

instance.active(0);

.start()

Start slideshow

instance.start();

.stop()

Stop slideshow

instance.stop();

.toggle()

Minimize/maximize Announcement widget

instance.toggle();

.close()

Remove Announcement widget

instance.close();

.autoResize()

Update size of the widget when window size changes

instance.autoResize();

.getCookie(name)

Get cookie has name is jquery.announcement

instance.getCookie('jquery.announcement');

.setCookie(name, value, exdays, path)

Set cookie to hide Announcement widget

instance.setCookie('jquery.announcement', 'hidden', 1);

Remove cookie

instance.setCookie('jquery.announcement', '', -1);

.detectCSSFeature(name)

Detecting browser supports CSS feature

instance.detectCSSFeature('transform');

Thanks to

jQuery boilerplate team and a bunch of awesome contributors.

License

MIT License © Zzbaivong