Permalink
Browse files

Added a minified version (compiled via Google Closure Compiler).

Removed unnecessary whitespace from JS files.
Enabled syntax highlighting for the README.md.
  • Loading branch information...
1 parent 94826e7 commit 54979781e9d82280a2f142ed906c3671f029e6c5 @blueimp committed Dec 11, 2011
Showing with 114 additions and 188 deletions.
  1. +0 −1 .gitignore
  2. +62 −54 README.md
  3. +0 −96 README.txt
  4. +7 −7 application.js
  5. +1 −1 index.html
  6. +29 −29 jquery.image-gallery.js
  7. +15 −0 jquery.image-gallery.min.js
View
@@ -1 +0,0 @@
-.DS_Store
View
@@ -1,62 +1,66 @@
# jQuery Image Gallery Plugin
## Demo
-[jQuery Image Gallery](http://blueimp.github.com/jQuery-Image-Gallery/)
+[jQuery Image Gallery Demo](http://blueimp.github.com/jQuery-Image-Gallery/)
## Description & Usage
The Image Gallery plugin makes use of jQuery's
[delegate](http://api.jquery.com/delegate/) method to attach
a click event handler for all child elements matching a selector,
now or in the future, of the given set of root elements:
- $('#gallery').imagegallery();
+```js
+$('#gallery').imagegallery();
+```
It is possible to override the default selector as well as a number of
additional gallery options:
- $('#gallery').imagegallery({
- // selector given to jQuery's delegate method:
- selector: 'a[rel="gallery"]',
- // event handler namespace:
- namespace: 'imagegallery',
- // Shows the next image after the given time in ms (0 = disabled):
- slideshow: 0,
- // Offset of image width to viewport width:
- offsetWidth: 100,
- // Offset of image height to viewport height:
- offsetHeight: 100,
- // Display images fullscreen (overrides offsets):
- fullscreen: false,
- // Display images as canvas elements:
- canvas: false,
- // body class added on dialog display:
- bodyClass: 'gallery-body',
- // element id of the loading animation:
- loaderId: 'gallery-loader',
- // list of available dialog effects,
- // used when show/hide is set to "random":
- effects: [
- 'blind',
- 'clip',
- 'drop',
- 'explode',
- 'fade',
- 'fold',
- 'puff',
- 'slide',
- 'scale'
- ],
- // The following are jQuery UI dialog options, see
- // http://jqueryui.com/demos/dialog/#options
- // for additional options and documentation:
- modal: true,
- resizable: false,
- width: 'auto',
- height: 'auto',
- show: 'fade',
- hide: 'fade',
- dialogClass: 'gallery-dialog'
- });
+```js
+$('#gallery').imagegallery({
+ // selector given to jQuery's delegate method:
+ selector: 'a[rel="gallery"]',
+ // event handler namespace:
+ namespace: 'imagegallery',
+ // Shows the next image after the given time in ms (0 = disabled):
+ slideshow: 0,
+ // Offset of image width to viewport width:
+ offsetWidth: 100,
+ // Offset of image height to viewport height:
+ offsetHeight: 100,
+ // Display images fullscreen (overrides offsets):
+ fullscreen: false,
+ // Display images as canvas elements:
+ canvas: false,
+ // body class added on dialog display:
+ bodyClass: 'gallery-body',
+ // element id of the loading animation:
+ loaderId: 'gallery-loader',
+ // list of available dialog effects,
+ // used when show/hide is set to "random":
+ effects: [
+ 'blind',
+ 'clip',
+ 'drop',
+ 'explode',
+ 'fade',
+ 'fold',
+ 'puff',
+ 'slide',
+ 'scale'
+ ],
+ // The following are jQuery UI dialog options, see
+ // http://jqueryui.com/demos/dialog/#options
+ // for additional options and documentation:
+ modal: true,
+ resizable: false,
+ width: 'auto',
+ height: 'auto',
+ show: 'fade',
+ hide: 'fade',
+ dialogClass: 'gallery-dialog'
+});
+```
The click handler opens the linked images in a jQuery UI dialog.
The options object given to the imagegallery method is passed to the
@@ -66,17 +70,21 @@ and allows to override any
It is possible to change options after widget initialization:
- $('#gallery').imagegallery('option', 'fullscreen', true);
- $('#gallery').imagegallery('option', {
- show: 'slide',
- hide: 'slide'
- });
+```js
+$('#gallery').imagegallery('option', 'fullscreen', true);
+$('#gallery').imagegallery('option', {
+ show: 'slide',
+ hide: 'slide'
+});
+```
The Image Gallery widget can also be disabled/enabled/destroyed:
- $('#gallery').imagegallery('disable');
- $('#gallery').imagegallery('enable');
- $('#gallery').imagegallery('destroy');
+```js
+$('#gallery').imagegallery('disable');
+$('#gallery').imagegallery('enable');
+$('#gallery').imagegallery('destroy');
+```
## Requirements
* [jQuery](http://jquery.com/) v. 1.6+
@@ -87,4 +95,4 @@ Released under the [MIT license](http://creativecommons.org/licenses/MIT/).
## Source Code & Download
* Browse and checkout the [source code](https://github.com/blueimp/jQuery-Image-Gallery).
-* [Download](https://github.com/blueimp/jQuery-Image-Gallery/archives/master) the project to add the plugin to your website.
+* [Download](https://github.com/blueimp/jQuery-Image-Gallery/downloads) the project to add the plugin to your website.
View
@@ -1,96 +0,0 @@
-jQuery Image Gallery Plugin
-===========================
-
-Demo
-----
-http://blueimp.github.com/jQuery-Image-Gallery/
-
-Description & Usage
--------------------
-The Image Gallery plugin makes use of jQuery's delegate
-(http://api.jquery.com/delegate/) method to attach
-a click event handler for all child elements matching a selector,
-now or in the future, of the given set of root elements:
-
- $('#gallery').imagegallery();
-
-It is possible to override the default selector as well as a number of
-additional gallery options:
-
- $('#gallery').imagegallery({
- // selector given to jQuery's delegate method:
- selector: 'a[rel="gallery"]',
- // event handler namespace:
- namespace: 'imagegallery',
- // Shows the next image after the given time in ms (0 = disabled):
- slideshow: 0,
- // Offset of image width to viewport width:
- offsetWidth: 100,
- // Offset of image height to viewport height:
- offsetHeight: 100,
- // Display images fullscreen (overrides offsets):
- fullscreen: false,
- // Display images as canvas elements:
- canvas: false,
- // body class added on dialog display:
- bodyClass: 'gallery-body',
- // element id of the loading animation:
- loaderId: 'gallery-loader',
- // list of available dialog effects,
- // used when show/hide is set to "random":
- effects: [
- 'blind',
- 'clip',
- 'drop',
- 'explode',
- 'fade',
- 'fold',
- 'puff',
- 'slide',
- 'scale'
- ],
- // The following are jQuery UI dialog options, see
- // http://jqueryui.com/demos/dialog/#options
- // for additional options and documentation:
- modal: true,
- resizable: false,
- width: 'auto',
- height: 'auto',
- show: 'fade',
- hide: 'fade',
- dialogClass: 'gallery-dialog'
- });
-
-The click handler opens the linked images in a jQuery UI dialog.
-The options object given to the imagegallery method is passed to the
-jQuery UI dialog (http://jqueryui.com/demos/dialog/) initialization
-and allows to override any dialog options
-(http://jqueryui.com/demos/dialog/#options).
-
-It is possible to change options after widget initialization:
-
- $('#gallery').imagegallery('option', 'fullscreen', true);
- $('#gallery').imagegallery('option', {
- show: 'slide',
- hide: 'slide'
- });
-
-The Image Gallery widget can also be disabled/enabled/destroyed:
-
- $('#gallery').imagegallery('disable');
- $('#gallery').imagegallery('enable');
- $('#gallery').imagegallery('destroy');
-
-Requirements
-------------
- - jQuery v. 1.6+
- - jQuery UI v. 1.8+ (Required: Widget, Dialog)
-
-License
--------
-Released under the MIT license:
-http://creativecommons.org/licenses/MIT/
-
-Source Code & Download
-----------------------
-https://github.com/blueimp/jQuery-Image-Gallery
View
@@ -1,5 +1,5 @@
/*
- * jQuery Image Gallery Plugin JS Example 2.0
+ * jQuery Image Gallery Plugin JS Example 2.0.1
* https://github.com/blueimp/jQuery-Image-Gallery
*
* Copyright 2011, Sebastian Tschan
@@ -9,7 +9,7 @@
* http://creativecommons.org/licenses/MIT/
*/
-/*jslint white: true, unparam: true, regexp: true */
+/*jslint unparam: true, regexp: true */
/*global $, document, window */
$(function () {
@@ -29,10 +29,10 @@ $(function () {
)
);
});
-
+
// Create a buttonset out of the checkbox options:
$('#buttonset').buttonset();
-
+
// Listen to options changes:
$('#buttonset input, #effect').change(function () {
$('#gallery').imagegallery('option', {
@@ -42,13 +42,13 @@ $(function () {
slideshow: $('#option-slideshow').is(':checked') && 5000
});
});
-
+
// Enable real fullscreen mode:
$('#option-fullscreen').click(function () {
var checkbox = $(this),
root = document.documentElement;
if (checkbox.is(':checked')) {
- if(root.webkitRequestFullScreen) {
+ if (root.webkitRequestFullScreen) {
root.webkitRequestFullScreen(
window.Element.ALLOW_KEYBOARD_INPUT
);
@@ -85,4 +85,4 @@ $(function () {
}
});
-});
+});
View
@@ -77,7 +77,7 @@
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
-<script src="jquery.image-gallery.js"></script>
+<script src="jquery.image-gallery.min.js"></script>
<script src="application.js"></script>
</body>
</html>
Oops, something went wrong.

0 comments on commit 5497978

Please sign in to comment.