我正在使用带有 lighbox 选项的 galleria,它在 chrome 和其他浏览器中运行良好,但在 Mozilla 中它不起作用。
<script>
jQuery(document).ready(function() {
// Load the classic theme
Galleria.loadTheme('js/galleria.classic.min.js');
// Initialize Galleria
Galleria.run('#flexy_gallery', {
showInfo:true,
showCounter:false,
// search flickr for "Cantonese food"
flickr: 'search: cartoon',
flickrOptions: {
// sort by interestingness
sort: 'interestingness-desc'
},
description : true ,
});
Galleria.configure({
lightbox: true
});
});
</script>
我调试了 Galleria JS,发现它进入了 Mozilla Fire Fox 中的滑动功能之一,因此它无法打开灯箱
if ( swipe ) {
//Mozilla goes inside this loop and due to this it does not call **_show** function
} else {
//for other browser it goes inside this loop and works fine
protoArray.push.call( this._queue, {
index : index,
rewind : rewind
});
if ( !this._queue.stalled ) {
this._show();
}
}
这样做:
Galleria.configure({
lightbox: true,
swipe:false
});