Events

Demos

NEW!!! Now with CSS3 Support

Now the plugin with detect if browser supports CSS3 animations than it will animate the element using CSS3 which will perform much better than animating using jQuery.

The pauseOnHover also works using CSS3. The plugin just prepares the setup and required CSS3 animation CSS.

Due to some reasons if you want plugin to animate always using jQuery than you need to set allowCss3Support option to false. Also an extra option css3easing is added.

Example of same element being animated using CSS3 and jQuery

Longer text lorem ipsum dolor sit amet, consectetur adipiscing elit END.
<= CSS3 animated (if your browser supports CSS3 animation. You can check this element in inspector.)
Longer text lorem ipsum dolor sit amet, consectetur adipiscing elit END.
<= Animated using jQuery by having allowCss3Support=false as data attribute. Inspect the element and you will see margin-left option being changed using jQuery.

Default options

NOTE: Following 3 marquee has different length of text but the speed is same. Plugin will adjust the speed according to the length of your text. (new feature)
Less text here
Longer text lorem ipsum dolor sit amet, consectetur adipiscing elit END.
Very very long text lorem ipsum dolor sit amet, lorem ipsum dolor sit amet lorem ipsum dolor sit amet consectetur adipiscing elit END.

Options as data attributes

<div data-speed="2000" data-direction="right" class='marquee'>Lorem ipsum dolor sit amet, consectetur adipiscing elit END.</div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit END.

Overwrite the default options with following

$('.marquee-with-options').marquee({
  speed: 5000,
  gap: 50,
  delayBeforeStart: 0,
  direction: 'left',
  duplicated: true,
  pauseOnHover: true
});
Lorem ipsum dolor sit amet, consectetur adipiscing elit END.
Pause the above animation | Resume the paused animation | Pause on hover this link

Direction vertical with default options

$('.marquee-vert').marquee({
  direction: 'up',
  speed: 1500
});

Before (no height provided to the element)

Nascetur suscipit distinctio optio commodi repudiandae aut exercitationem mauris. Blanditiis conubia hic dolorum! Vitae varius adipisci facilisis.

After

Nascetur suscipit distinctio optio commodi repudiandae aut exercitationem mauris. Blanditiis conubia hic dolorum! Vitae varius adipisci facilisis.

With direction 'down' (using data attributes)

Nascetur suscipit distinctio optio commodi repudiandae aut exercitationem mauris. Blanditiis conubia hic dolorum! Vitae varius adipisci facilisis.

Direction vertical with duplicated option true (using data attributes) and height of 50px assigned using CSS

Inspect the following marquee to see data attributes and style attribute

Starts here Nascetur suscipit distinctio optio commodi repudiandae aut exercitationem mauris. Blanditiis conubia hic dolorum! Vitae varius adipisci facilisis, laudantium ratione. Wisi! Quidem tortor, quisquam earum! Pretium necessitatibus.

With pauseOnHover and pauseOnCycle options

Nascetur suscipit distinctio optio commodi repudiandae aut exercitationem mauris. Blanditiis conubia hic dolorum! Vitae varius adipisci facilisis.