2014-02-20 2 views
0

라이트 박스의 다음 버튼을 비활성화/숨기려고합니다. galleria.io 이미지 갤러리를 사용 중입니다. 도와주세요. JS 바이올린 : http://jsfiddle.net/sudiptabanerjee/m6x23/galleria.io 라이트 박스 마지막 이미지의 다음 버튼 사용 안함

자바 스크립트

// Initialize Galleria 
$(document).ready(function() { 
if (document.getElementById('galleria')) { 
Galleria.run('#galleria', { 
     transition: 'fadeslide', 
     imageCrop: false, 
     lightbox: true, 
     wait: true, 
     height:350, 
     debug:false 
}); 
} 
}); 

도와주세요.

답변

1

그것은 지금 http://jsfiddle.net/sudiptabanerjee/m6x23/7/

Galleria.ready(function() { 
Galleria.on('image', function (e) { 
    if (this._active == this._data.length - 1) { 
     $('.galleria-image-nav-right').hide(); 
    } else { 
     $('.galleria-image-nav-right').show(); 
    } 
    if (this._active == 0) { 
     $('.galleria-image-nav-left').hide(); 
    } else { 
     $('.galleria-image-nav-left').show(); 
    } 
}); 

Galleria.on('lightbox_image', function (e) { 
    if (this._lightbox.active == this._data.length - 1) { 
     $('.galleria-lightbox-next').hide(); 
     $('.galleria-lightbox-nextholder').hide(); 
    } else { 
     $('.galleria-lightbox-next').show(); 
     $('.galleria-lightbox-nextholder').show(); 
    } 
    if (this._lightbox.active == 0) { 
     $('.galleria-lightbox-prev').hide(); 
     $('.galleria-lightbox-prevholder').hide(); 
    } else { 
     $('.galleria-lightbox-prev').show(); 
     $('.galleria-lightbox-prevholder').show(); 
    } 
}); 

}); 
을하고있다