leafo / sticky-kit

A jQuery plugin for creating smart sticky elements
http://leafo.net/sticky-kit
2.91k stars 517 forks source link

sticky-kit not working my product page.? #273

Open monparaashvin opened 4 years ago

monparaashvin commented 4 years ago

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