forked from chrismytton/fancybox-rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10851fd
commit b1fd194
Showing
1 changed file
with
2 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,3 @@ | ||
fancybox-rails | ||
============== | ||
# Moved! | ||
|
||
[![Build Status](http://travis-ci.org/hecticjeff/fancybox-rails.png)](http://travis-ci.org/hecticjeff/fancybox-rails) | ||
|
||
Use [fancybox](http://www.fancyapps.com/fancybox/) with rails 3.1 asset pipeline. | ||
|
||
## Installation | ||
|
||
This gem vendors jquery fancybox 2 for Rails 3.1 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`: | ||
|
||
``` ruby | ||
gem 'jquery-rails' | ||
gem 'fancybox-rails' | ||
``` | ||
|
||
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: | ||
|
||
``` javascript | ||
//= require jquery | ||
//= require fancybox | ||
``` | ||
|
||
And then edit your `app/assets/stylesheets/application.css` file to | ||
look something like: | ||
|
||
``` css | ||
/* | ||
*= require_self | ||
*= require fancybox | ||
*= require_tree . | ||
*/ | ||
``` | ||
|
||
That's it! | ||
|
||
## Usage | ||
|
||
With the gem installed and included in your asset manifests, you can now | ||
use fancybox as you normally would. | ||
|
||
``` javascript | ||
$(document).ready(function() { | ||
$("a.fancybox").fancybox(); | ||
}); | ||
``` | ||
|
||
## More information | ||
|
||
* [Contributors](https://github.com/hecticjeff/fancybox-rails/contributors) | ||
* [DHH's RailsConf 2011 talk on the rails 3.1 asset pipeline](http://www.youtube.com/watch?v=cGdCI2HhfAU) | ||
|
||
Copyright (c) Chris Mytton | ||
|
||
## License | ||
|
||
[Fancybox 2 license](http://www.fancyapps.com/fancybox/#license) | ||
This gem has been moved to it's own repo & own gem over at https://github.com/kyparn/fancybox2-rails. |