JQuery Quote Rotator Plugin.

Here’s a jQuery plugin that rotates through list items with a nice fade effect. You may nest any type of element you like inside a given list item.

Here’s an example using blockquotes and citations:

  • Lorem ipsum dolor sit amet elit!

    — Alabama

  • Excepteur sint occaecat cupidatat non proident!

    — Georgia

  • Duis aute irure dolor in reprehenderit?

    — Illinois

  • Excepteur sint mollit anim id est laborum.

    — West Virginia

How to make it work.

Drop these scripts in your header:

        
        
    

Call the function to any list element:

        $(document).ready(function() {
            $('ul#quotes').quote_rotator();
        });
    

And some configuration options:

        $('ul#quotes').quote_rotator({
             rotation_speed: 7000,    // defaults to 5000
             pause_on_hover: false   // defaults to true
        });
    

I’ve also built in a default to pause rotation on mouse hover. This is nice if you’re rotating through links or other elements that you might not want fading away from the user.

Download the project from github

Tags: ,

4 Comments

Your thoughts?

Preview