ksylvest / jquery-lighter

A jQuery plugin for zoomable images.
http://ksylvest.github.com/jquery-lighter/
MIT License
53 stars 24 forks source link

jQuery Lighter

Lighter is a jQuery plugin created to provide zoomable content like other light box plugins.

Installation

To install copy the javascripts and stylesheets directories into your project and add the following snippet to the header:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js" type="text/javascript"></script>
<script src="https://github.com/ksylvest/jquery-lighter/raw/master/javascripts/jquery.lighter.js" type="text/javascript"></script>
<link href="https://github.com/ksylvest/jquery-lighter/blob/master/stylesheets/jquery.lighter.css" rel="stylesheet" type="text/css" />

This plugin is also registered under http://bower.io/ to simplify integration. Try:

npm install -g bower
bower install lighter

Lastly this plugin is registered as a https://rails-assets.org/ to simplify integration with Ruby on Rails applications:

Gemfile

+ source 'https://rails-assets.org'
...
+ gem 'rails-assets-lighter'

application.css

/*
 ...
 *= require lighter
 ...
*/

application.js

//= require jquery
...
//= require lighter

Examples

Setting up a lighter is easy. The following snippet is a good start:

<a href="https://github.com/ksylvest/jquery-lighter/blob/master/samples/sample-01.png" data-lighter>
  <img src="https://github.com/ksylvest/jquery-lighter/raw/master/samples/preview-01.png" />
</a>
<a href="https://github.com/ksylvest/jquery-lighter/blob/master/samples/sample-02.png" data-lighter>
  <img src="https://github.com/ksylvest/jquery-lighter/raw/master/samples/preview-02.png" />
</a>
<a href="https://github.com/ksylvest/jquery-lighter/blob/master/samples/sample-03.png" data-lighter>
  <img src="https://github.com/ksylvest/jquery-lighter/raw/master/samples/preview-03.png" />
</a>
<a href="https://github.com/ksylvest/jquery-lighter/blob/master/samples/sample-04.png" data-lighter>
  <img src="https://github.com/ksylvest/jquery-lighter/raw/master/samples/preview-04.png" />
</a>
<a href="https://github.com/ksylvest/jquery-lighter/blob/master/samples/sample-05.png" data-lighter>
  <img src="https://github.com/ksylvest/jquery-lighter/raw/master/samples/preview-05.png" />
</a>
<a href="https://github.com/ksylvest/jquery-lighter/blob/master/samples/sample-06.png" data-lighter>
  <img src="https://github.com/ksylvest/jquery-lighter/raw/master/samples/preview-06.png" />
</a>

Contributing

Lighter is maintained in CoffeeScript. All contributions need to be submitted in CoffeeScript. The project includes a Cakefile that can be used to compile all assets (see: cake watch). For more information about CoffeeScript see:

Status

Status

Copyright

Copyright (c) 2010 - 2015 Kevin Sylvestre. See LICENSE for details.