Home
DAddYE edited this page Sep 12, 2010
·
3 revisions
This LightBox Helper is based on the lastest javascript LightBox 2
It’s only make an helper, copy the lastest javascripts, css, and images on your public/javascript directory and register the javascript in the AssetTagHelper of rails, so for include the javascript in your page you only can add this (if you havn’t yet):
<%= javascript_include_tag :defaults %>
You must add also the stylesheet so add this on your page head:
<%= stylesheet_link_tag ‘lightbox’ %>
The is very simple for add a LightBox in your page add this:
<%= lightbox_link_to "Link Name", "/path/of/your/image.png" %> or <%= lightbox_image_tag("/path/of/your/image-thumb.png", "/path/of/your/image.png", "album name" {:class=>"images"}, :title => "This is a test!") %>
You can add, title, controller, action what do u whant becaue it’s based on image_tag and link_to
It’s very simple
script/plugin install git://github.com/Lipsiasoft/lightbox.git
Please leave an ISSUE for adding bug and fatures requst.
It’s done for Rails 2.1
Build with Lightbox v2.03.3