fix error
This commit is contained in:
parent
597416e0d6
commit
91ee90befe
|
@ -4,6 +4,7 @@ $('.show-gallery .show-content.col-sm-2').ready(function(){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
window.GalleryTheater = function(){
|
window.GalleryTheater = function(){
|
||||||
|
bindKeyHandlers();
|
||||||
var parent_divs = $('.gallery').parents('div'),
|
var parent_divs = $('.gallery').parents('div'),
|
||||||
parent_div_z_index = parent_divs.eq(parent_divs.length-1).css('z-index')
|
parent_div_z_index = parent_divs.eq(parent_divs.length-1).css('z-index')
|
||||||
parent_divs.eq(parent_divs.length-1).css('z-index','2000')
|
parent_divs.eq(parent_divs.length-1).css('z-index','2000')
|
||||||
|
@ -103,18 +104,18 @@ window.GalleryTheater = function(){
|
||||||
|
|
||||||
var bindHandler = function(){
|
var bindHandler = function(){
|
||||||
// handler to close the theater
|
// handler to close the theater
|
||||||
gt.closeBtn.on("click",gt.destroyTheater);
|
gt.closeBtn.off('click').on("click",gt.destroyTheater);
|
||||||
|
|
||||||
// handler to show theater
|
// handler to show theater
|
||||||
$("div[data-list=images] a").on("click",function(){
|
$("div[data-list=images] a").off('click').on("click",function(){
|
||||||
gt.createTheater($(this).attr("href"));
|
gt.createTheater($(this).attr("href"));
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
|
|
||||||
gt.switchBtn.on("click",gt.switchTheme);
|
gt.switchBtn.off('click').on("click",gt.switchTheme);
|
||||||
gt.descriptionToggle.on("click", gt.toggleDescription)
|
gt.descriptionToggle.off('click').on("click", gt.toggleDescription)
|
||||||
gt.stripPrevBtn.on("click", gt.scrollStripRight);
|
gt.stripPrevBtn.off('click').on("click", gt.scrollStripRight);
|
||||||
gt.stripNextBtn.on("click", gt.scrollStripLeft);
|
gt.stripNextBtn.off('click').on("click", gt.scrollStripLeft);
|
||||||
|
|
||||||
if(Modernizr.touch){
|
if(Modernizr.touch){
|
||||||
gt.imageContainer.swipe({
|
gt.imageContainer.swipe({
|
||||||
|
@ -190,9 +191,9 @@ window.GalleryTheater = function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
gt.createTheater = function(link){
|
gt.createTheater = function(link){
|
||||||
|
$('.gallery-img-desc').removeClass('active');
|
||||||
gt.stage.show();
|
gt.stage.show();
|
||||||
$("body").addClass("gallery-mode-on");
|
$("body").addClass("gallery-mode-on");
|
||||||
bindKeyHandlers();
|
|
||||||
gt.isTheaterInitialized = false;
|
gt.isTheaterInitialized = false;
|
||||||
if(!gt.isTheaterInitialized){
|
if(!gt.isTheaterInitialized){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
Loading…
Reference in New Issue