Skip to content

aaronbhansen/fancybox2-rails

This branch is 16 commits ahead of pehlert/fancybox2-rails:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e7259d0 · Dec 17, 2013
Dec 17, 2013
Oct 3, 2013
Oct 12, 2012
Dec 17, 2013
Nov 11, 2012
Jul 31, 2011
Sep 18, 2011
Oct 12, 2012
Oct 12, 2012
Nov 11, 2012
May 19, 2011
Aug 25, 2013
Sep 18, 2011
Aug 25, 2013

Repository files navigation

fancybox2-rails

Build Status

Use fancybox with rails 3.1/4 asset pipeline.

Installation

This gem vendors jquery fancybox 2 for Rails 3.1/4 and greater. The files will be added to the asset pipeline and available for you to use.

First add the following lines to your applications Gemfile:

gem 'jquery-rails'
gem 'fancybox2-rails', '~> 0.2.4'

Then run bundle install to update your application's bundle.

Now you need to edit your app/assets/javascripts/application.js file and add the following line:

//= require jquery
//= require fancybox

And then edit your app/assets/stylesheets/application.css file to look something like:

/*
 *= require_self
 *= require fancybox
 *= require_tree .
 */

You'll need to restart your Rails server and that's it!

Usage

With the gem installed and included in your asset manifests, you can now use fancybox as you normally would.

$(document).ready(function() {
  $("a.fancybox").fancybox();
});

More information

This gem is based on the original gem for Fancybox 1.x by Chris Mytton.

License

Please be aware that you'll need to purchase a license if you intend to use fancybox2 for commercial purposes.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 71.8%
  • JavaScript 27.8%
  • Other 0.4%