diff options
Diffstat (limited to 'src/js/fancybox.js')
-rwxr-xr-x | src/js/fancybox.js | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/src/js/fancybox.js b/src/js/fancybox.js index e06e4df..98663c2 100755 --- a/src/js/fancybox.js +++ b/src/js/fancybox.js @@ -1,6 +1,6 @@ (function($) { 'use strict'; - + // Run fancybox feature $(document).ready(function() { @@ -9,51 +9,31 @@ * @returns {void} */ function fancyFox() { - var arrows = true; - var thumbs = null; + var thumbs = false; // disable navigation arrows and display thumbs on medium and large screens if ($(window).height() > 480) { - arrows = false; - thumbs = { - width: 70, - height: 70 - }; + thumbs = true; } $('.fancybox').fancybox({ - maxWidth: 900, - maxHeight: 800, - fitToView: true, - width: '50%', - height: '50%', - autoSize: true, - arrows: arrows, - closeClick: false, - openEffect: 'elastic', - closeEffect: 'elastic', - prevEffect: 'none', - nextEffect: 'none', - padding: '0', - helpers: { - thumbs: thumbs, - overlay: { - css: { - overflow: 'hidden', - background: 'rgba(0, 0, 0, 0.85)' - } - } - }, - afterLoad: function() { - setTimeout(function() { - $('.fancybox-next > span, .fancybox-prev > span').css('visibility', 'visible'); - }, 400); + buttons: [ + 'fullScreen', + 'thumbs', + 'share', + 'download', + 'zoom', + 'close' + ], + thumbs: { + autoStart: thumbs, + axis: 'x' } }); } fancyFox(); - + $(window).smartresize(function() { fancyFox(); }); |