CarouFredSel for Rails
96d7aef494
ruby 2.0 in Ubuntu 14.04.2 doesn't like it when "TODOs" are in the gemspec description. This minor change addresses this problem. |
||
---|---|---|
lib | ||
vendor/assets/javascripts/caroufredsel | ||
.gitignore | ||
caroufredsel-rails.gemspec | ||
Gemfile | ||
LICENSE.txt | ||
Rakefile | ||
README.md |
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 indexmoveTo(index)
: Immediately move to the target original indexpause
: Pause the carousel
Get at the original carousel with Carousel#carousel
Needs CoffeeScript, 'cause I'm lazy right now!