Skip to content

jQuery plugin using CSS Animations to mimic the <blink> tag behaviour. Because we all loved the <blink> tag!

License

Notifications You must be signed in to change notification settings

leonderijke/jQuery-Modern-Blink

Repository files navigation

Modern Blink

jQuery plugin utilizing CSS Animations. Because we all loved the <blink> tag!

Modern Blink will use CSS Animations in browsers supporting them and fallback to jQuery Animations in older browsers.

Demo: http://codepen.io/leonderijke/pen/bkgxi

Heads up: This plugin is no longer being maintained. If you want to take over maintenance, please see this issue.

Installation

Include Modern Blink after the jQuery library:

<script src="/path/to/jquery.modern-blink.js"></script>

Or, install via Bower:

bower install modern-blink

Usage

Use Modern Blink like this on the desired elements:

$('.js-blink').modernBlink();

Options

The following options can be passed to Modern Blink (defaults are shown):

$(element).modernBlink({
	// Duration specified in milliseconds (integer)
	duration: 1000,

	// Number of times the element should blink ("infinite" or integer)
	iterationCount: "infinite",

	// Whether to start automatically or not (boolean)
	auto: true
});

Methods

Modern Blink provides the following public methods:

$(element).modernBlink('start'); // Will start the animation
$(element).modernBlink('stop'); // Will stop the animation

Events

Modern Blink will attach the following event listeners to the element:

$(element).trigger('modernBlink.start'); // Will start the animation
$(element).trigger('modernBlink.stop'); // Will stop the animation

Browser Support

Tested in:

  • Chrome
  • Safari
  • Firefox
  • Mobile Safari 5.1+
  • Android browser 4.0+
  • Internet Explorer 6+

License

MIT License

About

jQuery plugin using CSS Animations to mimic the <blink> tag behaviour. Because we all loved the <blink> tag!

Resources

License

Stars

Watchers

Forks

Packages

No packages published