#jQuery slide carrusel #Marquee Plugin with #CSS3 Support by @aamirafridi

Fuente: http://aamirafridi.com/jquery/jquery-marquee-plugin

Recently I been working on a project where a static text message needs to be animated similar to non-standard HTML marquee tag.

Googling gives me quite few jQuery plugins but they got so many options and complex html layout/structure was needed for the plugin to work. I decided to make a simple jQuery plugin which can scroll the text either left, right, up or down.


jQuery plugin to scroll the text like the old traditional marquee — Read More

Latest commit to the master branch on 10-21-2014

Download as zip



I am removing details about options & events from this blog post as github has all the details so its hard to maintain both. Here I will list few examples to show you how to use the plugin with different options:


Here is the list of some examples. You can open each pen below in new window and play around it. Also you can click HTML, CSS or JS tab to see the relevant code.

Basic example with default options

First include the plugin.

Content inside the main wrapper can have html.


Click the Edit button shown below to open the demo in new window.

Starting plugin with options
Using options as data attributes
Mixing data attributes and JS options

Check HTML tab for data attributes options and JS for options provided when applying the plugin. This is useful if you want to start all marquees with default options using JS and then if you want to have different option for certain marquee element using data attributes. Keep in mind that data attributes will take precedence over options provided using JS. Check this example where I define direction using both JS and data attributes.

CSS3 vs jQuery
resumeOnHover (the other way around)

Question on github: “There is some way to do the opposite of “pauseOnHover”, leave the text stopped until you hover on it, and when you mouseout it comes back to normal? Just like spotify does in their app.”

Pause & Resume methods
Toggle method
Destroy method
Change marquee with ajax content

Due to no ‘Access-Control-Allow-Origin’ issue, please click here to open pen in new window to see it in action.

rcarousel – a continuous #jQuery UI carousel … carrusel horizontal de divs

Fuente: http://ryrych.github.io/rcarousel/

Table of Content

rcarousel development is discontinued at the moment. Maybe If I have more time and feel like it I will resume the work on the project. Anyway I encourage you to share it, fork it and whaterver you feel like. But please – respect the licence.

  • January 25, 2012 – point release fixes issue #14.
  • January 13, 2012 – point release fixes issue #10.
  • December 31, 2011 – new stable version 1.1.1 has been released. See changelog for more.
  • December 12, 2011 – new stable version 1.1 has been released. See changelog for more.

rcarousel is a jQuery UI continuous carousel with many cool features. It is highly customizable and supports even olderbrowsers (No IE6, please).

simple to use

Now rcarousel is very simple to use. Just add some elements into a container and run the widget on it!

highly customizable

rcarousel does not force you to use one pre-defined theme. You can add your own custom navigation with no effort!

many options to choose from

There are many options to choose from. Configure your carousel whatever you like!

Any element

As of 1.1 version you can use hopefully any HTML element inside a carousel. To illustrate this, take a look at the carousel I used at the top of the page.

images with links

As of 1.1 version there is no problem with wrapping IMG elements with links. Another nice feature!

Multiple carousels

You can add as many carousels as you like to a page without a problem. To see a working example, take a look atmulti carousels example.

Vertical carousels

rcarousel supports also vertical orientation of carousels.

Loading elements on demand

With the help of append method, you can load elements on demand. It can come in handy in AJAX calls.

Auto mode

Thanks to the Auto mode you do not even have to use navigation.

cool pagination

The pagination algorithm that is a part of rcarousel allows you to use a custom number of visible elements and a step to scroll by.

simple API

Available API allows you to control rcarousel at the run-time!


rcarousel was tested and has been tested in many browsers. If you come across a bug, please report it in the bug tracker. Some browsers like Internet Explorer 6 are too old and will not be supported. Because of some browsers release cycle like that of Chrome (and Firefox until recently), it is very hard to keep track of rcarousel behaviour in these browsers. Thus the widget was tested just in Chrome/Chromium. Also please note, it is not so easy to estimate the number of browsers to test in especially when it comes to minor releases or a bug fix releases. The more the better is not the answer. If the browser you want to use rcarousel in, is for some reason important to you, and the widget doesn’t work in it, you can fill in a bug report inthe bug tracker.

rcarousel was tested in the following browsers:

  • Internet Explorer 7+
  • Firefox 3.0+
  • Chrome
  • Opera 10.10+ (there are problems with animation in 10.00)
  • Safari 4.0.5+
Getting Started

To get started, add the following JavaScript scripts. rcarousel is built on jQuery 1.7. Since rcarousel is a jQuery UI widget, some additional dependencies are required.

In examples below, replace path with the path to the folder where rcarousel is kept:

<script type="text/javascript" src="path/widget/lib/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="path/widget/lib/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="path/widget/lib/jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="path/widget/lib/jquery.ui.rcarousel.min.js"></script>

Then add the following style sheet in the head section:

<link type="text/css" rel="stylesheet" href="path/widget/css/rcarousel.css" />

To make it work, add images, or any html content inside some DIV element. For example:

<div id="carousel">
	<img src="flowers/tulip.jpg" alt="a tulip"/>
	<img src="flowers/rose.jpg" alt="a rose"/>
	<img src="flowers/daisy.jpg" alt="a daisy"/>
	<img src="flowers/sunflower.jpg" alt="a sunflower"/>
	<img src="flowers/pansy.jpg" alt="a pansy"/>

Then run it:

<script type="text/javascript">
	jQuery(function($) {
		$( "#carousel" ).rcarousel();

Now rcarousel will be run with the default options. You should at least change default size of an element, for instance:

<script type="text/javascript">
	jQuery(function($) {
		$( "#carousel" ).rcarousel( {width: 200, height: 200} );

Remember that number of elements you add to a carousel have to be at least number of elements you specify in ‘visible’ option! Otherwise the carousel will not run.

Configuration Options
Option Type Default value Description
visible integer 3 Number of visible elements. This number is the minimum number of elements you have to add.
step integer 3 Number of elements to scroll by
width integer 100 Width of carousel’s elements
height integer 100 Height of carousel’s elements
speed integer 1000 Speed in milliseconds of scrolling animation
margin integer 0 Margin between elements
orientation string [“horizontal” | “vertical”] “horizontal” Orientation of carousel
auto object {enabled: boolean, direction: string [“next” | “prev”], interval: integer {enabled: false, direction: “next”, interval: 5000} Enables or disables automatic scrolling.
startAtPage integer 0 Which page load first
navigation object {next: string, prev: string} {next: “#ui-carousel-next”, prev: “#ui-carousel-prev”} Attach click handler to a given class “.class” or an id “#id”
start event Triggered when carousel is ready to use
pageLoaded event Triggered when page is loaded (scrolled into view)
Public API
Method Usage example Description
next $( “#carousel” ).rcarousel( “next” ); load next elements by step – elements are scrolled left
prev $( “#carousel” ).rcarousel( “prev” ); load previous elements by step – elements are scrolled right
goToPage $( “#carousel” ).rcarousel( “goToPage”, 5 ); goes to a given page
getTotalPages $( “#carousel” ).rcarousel( “getTotalPages” ); returns number of total pages
getCurrentPage $( “#carousel” ).rcarousel( “getCurrentPage” ); returns number of current page
append $( “#carousel” ).rcarousel( “append”, $jQueryElements ); adds $jQueryElements to carousel; it’s handy in Ajax calls; see the example
1.1.2 → 1.1.3

Version 1.1.3 is a point release that fixes the issue #14. As you can read there, this one-character typo makes html carousel example broken in IE7. Sorry for inconvenience!

1.1.1 → 1.1.2

Version 1.1.2 is a point release that fixes the issue #10.

1.1 → 1.1.1

Version 1.1.1 is a quick release to help you use rcarousel with a lightbox. Now event handlers and data are copied as well. Have a peek at this awesome example. Please consider donating some money. As this is the last day of 2011 year, I wish you all the best in the coming 2012 year!

1.0 → 1.1

Simple to use

Now, using rcarousel is even more simple. Just add some content into a container and run it!

Any content

Version 1.1 supports any kind of content in a carousel. Not only images!

Ajax handling

Ajax calls have been delegated to third parties. See the example.

Simplified pagination algorithm

Main pagination algorithm has been further improved and well documented.

New public methods

append and getCurrentPage are new public methods.

Where to get help?

First, do not use bug tracker to get help! It’s not meant to be a helping center. Also do not e-mail me directly with a problem that could easily be solved by someone else. To get help, I encourage you to ask, for example on stackoverflow or other Q&A service.
Remember, bug tracker is for reporting bugs and, to some extent, asking for features.