CarouFredSel for Rails
Go to file
Konstantinos Vandikas b82eebbeff Update caroufredsel-rails.gemspec
remove TODOs
2015-10-13 16:42:29 +02:00
lib update caroufredsel 2012-12-14 14:46:46 -05:00
vendor/assets/javascripts/caroufredsel update caroufredsel 2012-12-14 14:46:46 -05:00
.gitignore initial commit 2012-10-07 14:44:41 -04:00
caroufredsel-rails.gemspec Update caroufredsel-rails.gemspec 2015-10-13 16:42:29 +02:00
Gemfile initial commit 2012-10-07 14:44:41 -04:00
LICENSE.txt initial commit 2012-10-07 14:44:41 -04:00
Rakefile initial commit 2012-10-07 14:44:41 -04:00
README.md initial commit 2012-10-07 14:44:41 -04:00

Use CarouFredSel with Rails. It's pretty good!

Gemfile:

gem 'caroufredsel-rails', :git => 'git://github.com/johnbintz/caroufredsel-rails.git'

app/assets/javascripts/application.js:

//= require caroufredsel

carousel = new Carousel(
  $('#carousel_items'),
  {
    onChange: function(items) {
      // something when the items change
    },
    otherCarouFredSelOptions: 'go here'_
  }
);

Carousel objects respond to the following:

  • slideTo(index): Slide to the target original index
  • moveTo(index): Immediately move to the target original index
  • pause: Pause the carousel

Get at the original carousel with Carousel#carousel

Needs CoffeeScript, 'cause I'm lazy right now!