leafo / sticky-kit

A jQuery plugin for creating smart sticky elements

Home Page:http://leafo.net/sticky-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sticky-kit not working my product page.?

monparaashvin opened this issue · comments

code but not working my js file
` $(window).on('load resize', function () {
var product_summery_sticky = $(".single-product-page .single-product-info");
var product_images_sticky = $(".single-product-page .f-image .single-product-image");
var product_summery_sticky_height = product_summery_sticky.height();
var product_images_sticky_height = product_images_sticky.height();

    if ($(window).width() > 768) {
        var offset = 15;
            if(product_summery_sticky_height > product_images_sticky_height){
                product_images_sticky.stick_in_parent({
                    offset_top: offset
              });
            }
              if(product_summery_sticky_height < product_images_sticky_height){
                product_summery_sticky.stick_in_parent({
                    offset_top: offset
              });
            }
    } else{
                product_images_sticky.trigger('sticky_kit:detach');
                 product_summery_sticky.trigger('sticky_kit:detach');
            }
    }
});`

screenshot:-https://prnt.sc/qslu8j