diff --git a/bower.json b/bower.json
index 0dcd1ea1c..7fd0a417f 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "lightgallery",
- "version": "1.2.17",
+ "version": "1.2.18",
"description": "A lightweight, customizable, modular, responsive, lightbox gallery plugin for jQuery.",
"main": [
"dist/js/lightgallery.min.js",
diff --git a/dist/css/lg-fb-comment-box.css b/dist/css/lg-fb-comment-box.css
index dac7fd46e..eebf291bb 100644
--- a/dist/css/lg-fb-comment-box.css
+++ b/dist/css/lg-fb-comment-box.css
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
.lg-outer.fb-comments .lg-img-wrap {
diff --git a/dist/css/lg-transitions.css b/dist/css/lg-transitions.css
index 97a7e9216..7aa67dbfc 100644
--- a/dist/css/lg-transitions.css
+++ b/dist/css/lg-transitions.css
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
.lg-css3.lg-zoom-in .lg-item {
diff --git a/dist/css/lightgallery.css b/dist/css/lightgallery.css
index 981cfe2e8..c355382d4 100644
--- a/dist/css/lightgallery.css
+++ b/dist/css/lightgallery.css
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
@font-face {
@@ -834,3 +834,5 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
-o-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
}
+
+/*# sourceMappingURL=lightgallery.css.map */
diff --git a/dist/js/lg-autoplay.js b/dist/js/lg-autoplay.js
index b19c9d89a..999b3b595 100644
--- a/dist/js/lg-autoplay.js
+++ b/dist/js/lg-autoplay.js
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
/**
diff --git a/dist/js/lg-autoplay.min.js b/dist/js/lg-autoplay.min.js
index e0d8026c8..3a98bde58 100644
--- a/dist/js/lg-autoplay.min.js
+++ b/dist/js/lg-autoplay.min.js
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
!function(a,b,c,d){"use strict";var e={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.$items.length<2?!1:(this.core.s=a.extend({},e,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};f.prototype.init=function(){var a=this;a.core.s.autoplayControls&&a.controls(),a.core.s.progressBar&&a.core.$outer.find(".lg").append('
'),a.progress(),a.core.s.autoplay&&a.startlAuto(),a.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){a.interval&&(a.cancelAuto(),a.canceledOnTouch=!0)}),a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!a.interval&&a.canceledOnTouch&&(a.startlAuto(),a.canceledOnTouch=!1)})},f.prototype.progress=function(){var a,b,c=this;c.$el.on("onBeforeSlide.lg.tm",function(){c.core.s.progressBar&&c.fromAuto&&(a=c.core.$outer.find(".lg-progress-bar"),b=c.core.$outer.find(".lg-progress"),c.interval&&(b.removeAttr("style"),a.removeClass("lg-start"),setTimeout(function(){b.css("transition","width "+(c.core.s.speed+c.core.s.pause)+"ms ease 0s"),a.addClass("lg-start")},20))),c.fromAuto||c.core.s.fourceAutoplay||c.cancelAuto(),c.fromAuto=!1})},f.prototype.controls=function(){var b=this,c='';a(this.core.s.appendAutoplayControlsTo).append(c),b.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){a(b.core.$outer).hasClass("lg-show-autoplay")?(b.cancelAuto(),b.core.s.fourceAutoplay=!1):b.interval||(b.startlAuto(),b.core.s.fourceAutoplay=b.fourceAutoplayTemp)})},f.prototype.startlAuto=function(){var a=this;a.core.$outer.find(".lg-progress").css("transition","width "+(a.core.s.speed+a.core.s.pause)+"ms ease 0s"),a.core.$outer.addClass("lg-show-autoplay"),a.core.$outer.find(".lg-progress-bar").addClass("lg-start"),a.interval=setInterval(function(){a.core.index+1',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},f.prototype.requestFullscreen=function(){var a=c.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},f.prototype.exitFullscreen=function(){c.exitFullscreen?c.exitFullscreen():c.msExitFullscreen?c.msExitFullscreen():c.mozCancelFullScreen?c.mozCancelFullScreen():c.webkitExitFullscreen&&c.webkitExitFullscreen()},f.prototype.fullScreen=function(){var b=this;a(c).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){b.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement||c.msFullscreenElement?b.exitFullscreen():b.requestFullscreen()})},f.prototype.destroy=function(){this.exitFullscreen(),a(c).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=f}(jQuery,window,document);
\ No newline at end of file
diff --git a/dist/js/lg-hash.js b/dist/js/lg-hash.js
index 0121faae4..e0c50272b 100644
--- a/dist/js/lg-hash.js
+++ b/dist/js/lg-hash.js
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
(function($, window, document, undefined) {
@@ -33,13 +33,13 @@
});
// Listen hash change and change the slide according to slide value
- $(window).on('hashchange', function() {
+ $(window).on('hashchange.lg.hash', function() {
_hash = window.location.hash;
var _idx = parseInt(_hash.split('&slide=')[1], 10);
// it galleryId doesn't exist in the url close the gallery
if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
- _this.core.slide(_idx);
+ _this.core.slide(_idx, false, false);
} else if (_this.core.lGalleryOn) {
_this.core.destroy();
}
@@ -64,8 +64,10 @@
}
}
+ this.core.$el.off('.lg.hash');
+
};
$.fn.lightGallery.modules.hash = Hash;
-})(jQuery, window, document);
+})(jQuery, window, document);
\ No newline at end of file
diff --git a/dist/js/lg-hash.min.js b/dist/js/lg-hash.min.js
index de6ebd705..a44b63494 100644
--- a/dist/js/lg-hash.min.js
+++ b/dist/js/lg-hash.min.js
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
-!function(a,b,c,d){"use strict";var e={hash:!0},f=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},e,this.core.s),this.core.s.hash&&(this.oldHash=b.location.hash,this.init()),this};f.prototype.init=function(){var c,d=this;d.core.$el.on("onAfterSlide.lg.tm",function(a,c,e){b.location.hash="lg="+d.core.s.galleryId+"&slide="+e}),a(b).on("hashchange",function(){c=b.location.hash;var a=parseInt(c.split("&slide=")[1],10);c.indexOf("lg="+d.core.s.galleryId)>-1?d.core.slide(a):d.core.lGalleryOn&&d.core.destroy()})},f.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?b.location.hash=this.oldHash:history.pushState?history.pushState("",c.title,b.location.pathname+b.location.search):b.location.hash="")},a.fn.lightGallery.modules.hash=f}(jQuery,window,document);
\ No newline at end of file
+!function(a,b,c,d){"use strict";var e={hash:!0},f=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},e,this.core.s),this.core.s.hash&&(this.oldHash=b.location.hash,this.init()),this};f.prototype.init=function(){var c,d=this;d.core.$el.on("onAfterSlide.lg.tm",function(a,c,e){b.location.hash="lg="+d.core.s.galleryId+"&slide="+e}),a(b).on("hashchange.lg.hash",function(){c=b.location.hash;var a=parseInt(c.split("&slide=")[1],10);c.indexOf("lg="+d.core.s.galleryId)>-1?d.core.slide(a,!1,!1):d.core.lGalleryOn&&d.core.destroy()})},f.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?b.location.hash=this.oldHash:history.pushState?history.pushState("",c.title,b.location.pathname+b.location.search):b.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightGallery.modules.hash=f}(jQuery,window,document);
\ No newline at end of file
diff --git a/dist/js/lg-pager.js b/dist/js/lg-pager.js
index 89aed2a69..fa786088a 100644
--- a/dist/js/lg-pager.js
+++ b/dist/js/lg-pager.js
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
(function($, window, document, undefined) {
diff --git a/dist/js/lg-pager.min.js b/dist/js/lg-pager.min.js
index 9c1a3e422..568860f86 100644
--- a/dist/js/lg-pager.min.js
+++ b/dist/js/lg-pager.min.js
@@ -1,4 +1,4 @@
-/*! lightgallery - v1.2.17 - 2016-04-06
+/*! lightgallery - v1.2.18 - 2016-04-13
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
!function(a,b,c,d){"use strict";var e={pager:!1},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};f.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append(''),e.core.s.dynamic)for(var g=0;g