A rails implementation of Lightbox 2
JavaScript CSS Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app/assets
lib
README.rdoc
rubylight.gemspec

README.rdoc

NOTE

Currently not being supported- there's something weird going on between jquery and the javascript that's highly dependant on the version of jquery you're using. I don't really have time to figure it out right now, but I'll keep this up in case anyone wants to poke at it.

Rubylight

This is a simple implementation of Lokesh Dhakar's Lightbox 2,( lokeshdhakar.com/projects/lightbox2/ ) current with version 2.51. Its purpose is to simply make setup and use of Lightbox 2 easier for Rails users.

Installation and Setup

Add Ruby to your gem file:

gem 'rubylight'

and install it using bundler:

$ bundle install

Require the modified Lightbox css file in your application.css file:

*= require lightbox

Require the modified Lightbox javascript file in your application.js file:

//= require lightbox

Use

lightbox_tag(thumb, pic, title=nil, collection=nil, html_options = {})

thumb is the url of the smaller pic (the one you want displayed on the page)

pic is the url of the larger pic (the one you want displayed after clicking)

title is the caption displayed below the pic after clicking

collection is which collection the pic belongs to. Pictures in the same collection can be cycled.

html_options is any further html options for the link

Author

J Paul Wetstein (jeep.wetstein@gmail.com)

License

Licensed under the Creative Commons Attribution 2.5 License - creativecommons.org/licenses/by/2.5/

  • Free for use in both personal and commercial projects.

  • Attribution requires leaving author name, author email link, and the license info intact.