Skip to content

enviable/colorbox-rails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ColorboxRails

Make links open in lightbox (colorbox) a breeze

Usage

in your application.css

*= require colorbox-rails

in your application.js

//= require colorbox-rails

Then enable link to be displayed in colorbox by simply adding :colorbox => true attribute. E.g.

<%= link_to "My superb link", "#", :data => { :colorbox => true } %>

<a href=“#” data-colorbox=“true”>My superb link</a>

Add attributes inside the :data block

<%= link_to "My superb link", "#", :data => { :colorbox => true, :colorbox_height => '300px', :colorbox_width => '300px', :colorbox_iframe => true } %>

Available data options

Available link options

<%= link_to "My superb link", "#", rel: 'group1', :data => { :colorbox_static => true } %>

License

This project rocks and uses MIT-LICENSE.

About

Make links open in lightbox a breeze

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 70.9%
  • Ruby 29.1%