Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Commit

Permalink
Added AMD Wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
blueimp committed Feb 15, 2012
1 parent 43c530a commit bc50ca7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
26 changes: 21 additions & 5 deletions js/jquery.image-gallery.js
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
/* /*
* jQuery Image Gallery Plugin 2.2 * jQuery Image Gallery Plugin 2.3
* https://github.com/blueimp/jQuery-Image-Gallery * https://github.com/blueimp/jQuery-Image-Gallery
* *
* Copyright 2011, Sebastian Tschan * Copyright 2011, Sebastian Tschan
Expand All @@ -10,9 +10,25 @@
*/ */


/*jslint nomen: true */ /*jslint nomen: true */
/*global jQuery, window, document, setTimeout, clearTimeout */ /*global define, window, document, setTimeout, clearTimeout */


(function ($) { (function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'./load-image.js',
'jquery-ui'
], factory);
} else {
// Browser globals:
factory(
window.jQuery,
window.loadImage
);
}
}(function ($, loadImage) {
'use strict'; 'use strict';


// The Image Gallery plugin makes use of jQuery's delegate method to attach // The Image Gallery plugin makes use of jQuery's delegate method to attach
Expand Down Expand Up @@ -338,7 +354,7 @@
this._documentClickHandler this._documentClickHandler
); );
that._loaded = null; that._loaded = null;
this._img = $(window.loadImage( this._img = $(loadImage(
this._link.href, this._link.href,
function (img) { function (img) {
that._loadHandler(img); that._loadHandler(img);
Expand Down Expand Up @@ -523,4 +539,4 @@


}); });


}(jQuery)); }));
2 changes: 1 addition & 1 deletion js/jquery.image-gallery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
{ {
"name": "blueimp-image-gallery", "name": "blueimp-image-gallery",
"version": "2.2.0", "version": "2.3.0",
"title": "jQuery Image Gallery", "title": "jQuery Image Gallery",
"description": "jQuery Image Gallery is an extension to the Dialog component of jQuery UI, to ease navigation between a set of gallery images. It features mouse and keyboard navigation, transition effects, fullscreen mode and slideshow functionality.", "description": "jQuery Image Gallery is an extension to the Dialog component of jQuery UI, to ease navigation between a set of gallery images. It features mouse and keyboard navigation, transition effects, fullscreen mode and slideshow functionality.",
"keywords": [ "keywords": [
Expand Down Expand Up @@ -37,8 +37,7 @@
], ],
"dependencies": { "dependencies": {
"jquery": ">=1.6", "jquery": ">=1.6",
"jquery.ui.widget": ">=1.8", "jquery-ui": ">=1.8",
"jquery.ui.dialog": ">=1.8",
"blueimp-load-image": ">=1.1.4" "blueimp-load-image": ">=1.1.4"
} }
} }

0 comments on commit bc50ca7

Please sign in to comment.