Skip to content

jQuery plugin to scroll the text like the old traditional marquee

Notifications You must be signed in to change notification settings

imefisto/jQuery-Marquee

 
 

Repository files navigation

jQuery-Marquee

This is a fork of a plugin for marquee effect done with jquery.

Please go to https://github.com/aamirafridi/jQuery-Marquee for the original.

Changes:

Options:

  • speed: Speed in milliseconds of the marquee. Please make note that same speed value will react differently for text with different lengths. Default is 10000.
  • gap: Gap in pixels between the tickers. Default is 20
  • delayBeforeStart: Time in milliseconds before the marquee starts animation. Default is 1000
  • direction: Direction towards which the marquee will animate 'left' or 'right'. Default is 'left'
  • postAnimationPause: Time in milliseconds after the marquee ends animation. Default is 0 (it restarts the animation immediatly after finishing)

Demo:

Use:

###HTML:

<div class='marquee'>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam luctus consequat leo. Nullam fringilla interdum felis sed malesuada.</div>

###CSS:

.marquee {
  width: 300px;
  overflow: hidden;
  border:1px solid #ccc;
}

###Apply plugin:

/**
 * Example of starting a plugin with options.
 * I am just passing all the default options
 * so you can just start the plugin using $('.marquee').marquee();
*/
$('.marquee').marquee({
	//speed in milliseconds of the marquee
	speed: 15000,
	//gap in pixels between the tickers
	gap: 50,
	//gap in pixels between the tickers
	delayBeforeStart: 0,
	//'left' or 'right'
	direction: 'left',
	// duration of the pause after the animation
	postAnimationPause: 0
});

About

jQuery plugin to scroll the text like the old traditional marquee

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.4%
  • HTML 25.6%