You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.1 KiB
1 lines
1.1 KiB
!function(a){woodmartThemeModule.$document.on("wdHeaderBuilderInited",function(){woodmartThemeModule.stickyDetails()}),woodmartThemeModule.stickyDetails=function(){if(woodmartThemeModule.$body.hasClass("woodmart-product-sticky-on")&&!(woodmartThemeModule.$window.width()<=1024)){a(".entry-summary").each(function(){var b=a(this),c=40,d=b.find(".summary-inner"),e=b.parent().find(".product-images-inner");d.trigger("sticky_kit:detach"),e.trigger("sticky_kit:detach"),(woodmartThemeModule.$body.hasClass("enable-sticky-header")||a(".whb-sticky-row").length>0||a(".whb-sticky-header").length>0)&&(c=parseInt(woodmart_settings.sticky_product_details_offset)),e.imagesLoaded(function(){var a=d.outerHeight()-e.outerHeight();a<-100?d.stick_in_parent({offset_top:c}):a>100&&e.stick_in_parent({offset_top:c}),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.$window.width()<=1024?(d.trigger("sticky_kit:detach"),e.trigger("sticky_kit:detach")):d.outerHeight()<e.outerHeight()?d.stick_in_parent({offset_top:c}):e.stick_in_parent({offset_top:c})},300))})})}},a(document).ready(function(){woodmartThemeModule.stickyDetails()})}(jQuery); |