芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/Ultimate_VC_Addons/assets/min-js/sticky-section.min.js
jQuery(document).ready(function(w){const t=w(window);let g=t.width(),y=-1;function s(){(elements=w("div.ult-sticky-anchor")).each(function(){var e=w(this),i=e.find(".ult-sticky"),c=i.data("mobile"),r=e.find(".ult-space");if(g<768&&"no"==c)i.removeClass("ult-stick"),r.css("height",""),e.removeClass("ult-permanent-flag");else{let a=t.scrollTop(),l=e.offset().top;var c=t.height(),r=i.data("stick_behaviour"),n=i.data("support");if("stick_with_scroll_row"!=r&&"yes"!=n){let t=e.parent().width();var n=i.height(),o=i.data("gutter"),u=i.data("sticky_gutter_class"),d=i.data("sticky_gutter_id"),h=i.data("lr_position"),p=i.data("lr_value"),_=i.data("sticky_customwidth"),f=i.data("sticky_width"),k=i.data("sticky_position");let s=-1;o=v(0,o,u,d),"top"==k?a=parseInt(a)+parseInt(o):(a=parseInt(a)+parseInt(c)-parseInt(n)-parseInt(o),l=parseInt(l)),"fullwidth"==f?t="100%":"customwidth"==f&&(t=_);u={},d="width",c=(u[k]=o,u[d]=t,"stick_permanent"==r&&(u[h]=p),{});c[k]="",c[d]="","stick_permanent"!=r||e.hasClass("ult-permanent-flag")||(e.addClass("ult-permanent-flag"),i.addClass("ult-stick").css(u)),"stick_with_scroll"==r&&a>l?(s=0,e.hasClass("ult-flag")&&0!=y||(e.addClass("ult-flag"),s=(("fullwidth"==f?i.addClass("ult-stick-full-width"):i.addClass("ult-stick")).css(u),e.find(".ult-space").css("height",n),1))):"stick_with_scroll"==r&&e.hasClass("ult-flag")&&(e.removeClass("ult-flag"),("fullwidth"==f?i.removeClass("ult-stick-full-width"):i.removeClass("ult-stick")).css(c),e.find(".ult-space").css("height",""))}}}),y=-1}function v(a,t,s,l){var e;return s?(e=s.split(" "),jQuery.each(e,function(t,s){a=parseInt(a)+w(s).outerHeight()})):s="null",l?(e=l.split(" "),jQuery.each(e,function(t,s){a=parseInt(a)+w(s).outerHeight()})):l="null",t=t?parseInt(t)+parseInt(a):a}w("div.ult-sticky-anchor").each(function(){var s=w(this),a=(s.closest(".ult_row_spacer"),s.find(".ult-sticky")),l=a.data("stick_behaviour"),e=a.data("support");if("stick_with_scroll_row"==l||"no"!=e){var l=a.data("gutter"),i=a.data("sticky_gutter_class"),c=a.data("sticky_gutter_id"),a=a.data("mobile"),l=v(0,l,i,c);let t=s.closest(".wpb_column").closest(".vc_row");s.parent().offset().top;s.addClass("ult_stick_to_row"),t.addClass("ult_s_container"),"yes"==e&&(t="body"),g<768&&"no"==a||s.fixTo(t,{top:l,useNativeSticky:!1})}}),s(),t.resize(function(){y=0,g=t.width(),s()}),t.bind("scroll",function(){s()})});