No commit activity in last 3 years
No release in over 3 years
An asset gem pack the ColorBox jQuery Plugin (http://www.jacklmoore.com/colorbox)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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'

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:

<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:

$('a.colorbox').colorbox()