Sha256: bc9929aa99c19afafc5eda9882988c80b459ef8c4358e086f68b68df61fbd29f
Contents?: true
Size: 808 Bytes
Versions: 1
Compression:
Stored size: 808 Bytes
Contents
# Colorbox on Rails An asset gem pack the ColorBox jQuery Plugin (http://www.jacklmoore.com/colorbox) ## Installation Currently only support Rails 3.1 Add this line to `Gemfile`: gem 'colorbox-on-rails', :git => 'git@github.com:zetachang/colorbox-on-rails.git' And then execute: $ bundle ## Usage In `application.js`, add this line after `//=require jquery`: //=require jquery.colorbox In `application.css`, add this line after `=require_self`: *= require colorbox All the setting is done, the rest is up to you. For a simple use case, you can have a image link: ```erb <a href="<%= idea_post.photo.url %>" class="colorbox"> <%= image_tag idea_post.photo.url(:thumb), :class => 'photo' %> </a> ``` And invoke the colorbox in js file: ```js $('a.colorbox').colorbox() ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
colorbox-on-rails-0.0.1 | README.md |