README.md in fancybox-rails-0.2.0 vs README.md in fancybox-rails-0.2.1

- old
+ new

@@ -1,11 +1,9 @@ -fancybox-rails -============== +# fancybox-rails +Use [fancybox 1.3.4](http://fancybox.net/) with rails 3.1+ asset pipeline. -Use [fancybox 1.3.4](http://fancybox.net/) with rails 3.1 asset pipeline. - ## Installation This gem vendors jquery fancybox for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use. @@ -35,30 +33,42 @@ *= 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() { +jQuery(function() { $("a.fancybox").fancybox(); }); ``` +If you're using [CoffeeScript](http://coffeescript.org/) you can use the +plugin in the same way. + +```coffeescript +jQuery -> + $('a.fancybox').fancybox() +``` + +## Customization + +If you want to customize the fancybox assets you can copy the assets +from the gem into your application's `lib/assets/` directory. + + $ rails generate fancybox_rails + +If you want to see what files will be created without actually creating +them, run the generator with the `--pretend` option. + ## fancyBox 2.0 If you want to use [fancyBox 2.0](http://fancyapps.com/fancybox/) then check out [fancybox2-rails](https://github.com/kyparn/fancybox2-rails). - -```ruby -gem 'fancybox-rails', :git => 'https://github.com/sverigemeny/fancybox-rails' -``` Please be aware that the [license](http://fancyapps.com/fancybox/#license) has changed in the new version and you'll need to purchase one if you intend to use *that fork* for commercial purposes.