Sha256: c451485ae75e95e87865338c94438819929ec28ae4b4a9bed36938b4f779ae13

Contents?: true

Size: 1.67 KB

Versions: 5

Compression:

Stored size: 1.67 KB

Contents

$(document).ready(function() {

    var $c = $('.offer_full_desc');

    if ($c.length) {
        var $w = $c.find("div.big_gallery_wrapper");
        var $nav = $c.find('div.nav_gallery_wrapper');

        //noinspection JSUnresolvedFunction
        $w.magnificPopup({
            delegate: 'a',
            fixedContentPos: false,
            removalDelay: 300,
            mainClass: 'mfp-fade',
            type: 'image',
            gallery: {enabled:true}
        });

        $w.slick({
            slidesToShow: 1,
            slidesToScroll: 1,
            autoplay: false,
            fade:true,
            arrows:true,
            speed: 200,
            dots:false,
            infinite: true,
            asNavFor: '#offer_gallery'// TODO:: это негибкий хардкод, а что если на странице будет несколько галерей такого типа?
        });

        $nav.slick({
            slidesToShow: 3,
            slidesToScroll: 1,
            asNavFor: '#offer_gallery', // TODO:: это негибкий хардкод, а что если на странице будет несколько галерей такого типа?
            dots: false,
            speed: 200,
            //centerMode: true,
            arrows:false,
            focusOnSelect: true
        });

        /*setTimeout(function() {
         var $b = $("#gallery3_nav").find(".img-holder");
         //console.log($b);
         $b.bind({
         mouseenter: function() {
         $(this).addClass("plusOpacity");
         },
         mouseleave: function() {
         $(this).removeClass("plusOpacity");
         }
         })
         },100);*/


    }

});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
c80_catoffers-0.1.0.8 app/assets/javascripts/c80_catoffers/offer_full_desc.js
c80_catoffers-0.1.0.7 app/assets/javascripts/c80_catoffers/offer_full_desc.js
c80_catoffers-0.1.0.6 app/assets/javascripts/c80_catoffers/offer_full_desc.js
c80_catoffers-0.1.0.5 app/assets/javascripts/c80_catoffers/offer_full_desc.js
c80_catoffers-0.1.0.4 app/assets/javascripts/c80_catoffers/offer_full_desc.js