Include the lightbox effect from shadowbox to your photos, videos, flash, etc. This gem will include the latest shadowbox.js, shadowbox.css and shadowbox required images to your assets pipeline so it's ready for deploy.
Add this line to your application's Gemfile:
gem 'shadowbox-rails'
And then execute:
bundle
Or install it yourself as:
gem install shadowbox-rails
require shadowbox
@import 'shadowbox';
Add rel='shadowbox' to links where the href is your full size image like this:
link_to 'Test me!', asset_path('path_to_my_img.jpg'), rel: 'shadowbox'
Go to http://www.shadowbox-js.com/ for more details.
Add Shadowbox.init(); in <head> tag
<script type="text/javascript">
Shadowbox.init();
</script>
Go to http://www.shadowbox-js.com/usage.html for a complete list of all options.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request