PageSourceSearch

https://www.dietdoctor.com/wp-content/themes/ckdc/dist/js/preview-carousel.min.js?ver=1789975245

js dietdoctor.com collected 2026-10-01 10:19:47 UTC 4,987 bytes, 2 lines download raw bytes

1ckdc.ready((function(e){if("undefined"!=typeof ckdc){var t,n=0;ckdc.setup.addSetupContent("preview-carousel",(function(t){t.find(".preview-list.carousel:not(.init)").each((function(){!function(t){var a,o,s,l,r,c=e(t),d=!1,f=!1;function u(){n++,c.attr("id","preview-list-carousel-"+n),c.attr("id"),a=c.find(".preview-list-items"),o=c.find(".slider-content"),s=o.find(".preview-item"),i(c),ckdc.isMobile?c.addClass("mobile"):(c.hasClass("align-with-content"),a.prepend('<span class="pagination prev"><i class="pagination-icon"></i></span>'),a.append('<span class="pagination next"><i class="pagination-icon"></i></span>'),c.prepend('<aside class="page-indicator"><ul><li class="active"></li></ul></aside>'),l=c.find(".page-indicator"),I(0),v(s),p(),c.on("click",".pagination.next",C),c.on("click",".pagination.prev",y),c.on("mouseleave",z),c.on("mouseleave",".slider-content",L),o.on("mouseenter",".preview-item",S),b()),c.addClass("init")}function v(t){t.each((function(t,n){e(n).attr("data-index",t)}))}function p(){s.each((function(t,n){var i=e(n);i.data("left",i.position().left)}))}function m(e){var t=h();return e.data("index")==t.data("index")}function h(t,n){var i=2;"fully"==t&&(i=1),null==n&&(n=0);var a=e();return s.each((function(t,o){var s=(a=e(o)).offset().left,l=a.width();if(s+l-l/i>n)return!1})),a}function w(e){var t=g();return e.data("index")==t.data("index")}function g(t){var n=2;"fully"==t&&(n=1);var i=e(s.get().reverse()),a=e();return i.each((function(t,i){if((a=e(i)).data("left")+a.width()/n<c.width())return!1})),a}function C(e){if(!f){var t=g("fully");k(o.scrollLeft()+t.data("left")+t.width()-parseFloat(o.css("padding-left"))+10)}}function y(e){if(!f){var t=h("fully"),n=o.scrollLeft(),i=c.width(),a=t.data("left"),s=0-(i-a);k(s=0==(t=h("fully",s)).data("index")?0:n+(a=t.data("left"))-parseFloat(o.css("padding-left")))}}function x(e){var t=e.data("left"),n=t+e.width(),i=o.scrollLeft(),a=c.width();t<0?k(i+t-10):n>a&&k(i+(n-a)+10)}function k(t){f=!0,I(t),o.animate({scrollLeft:t},{duration:1e3,specialEasing:{scrollLeft:e.bez([.5,0,0,1])},complete:function(){b(),p(),f=!1}})}function I(e){e=void 0!==e?e:0;var t=c.width(),n=o[0].scrollWidth,i=100*t/n,a=100*e/n;l.find("li").css("width",i+"%").css("left",a+"%")}function b(){var e=o.scrollLeft()+o.outerWidth();o.scrollLeft()<=0?c.find(".pagination.prev").css("display","none").css("opacity","0"):c.find(".pagination.prev").show().css("display","").css("opacity",""),e>=o[0].scrollWidth?c.find(".pagination.next").css("display","none").css("opacity","0"):c.find(".pagination.next").show().css("display","").css("opacity","")}function z(){c.removeClass("hover")}function L(){d=!1}function S(t){b();var n=e(t.currentTarget);n.find("a").attr("title","");var i=n.hasClass("orientation-vertical")?ckdc.carouselZoomedSizesVt:ckdc.carouselZoomedSizes;n.find("img").attr("sizes",i),d?(c.addClass("hover"),T(n)):(null!=r&&clearTimeout(r),window.lastX=t.clientX,window.lastY=t.clientY,n.one("mousemove",(function(e){r=setTimeout((function(){n.one("mousemove",(function(e){window.lastX===e.clientX&&window.lastY===e.clientY||(r=setTimeout((function(){c.addClass("hover"),d=!0,T(n)}),200))}))}),100)})),n.one("mouseleave",(function(){n.off("mousemove"),null!=r&&(clearTimeout(r),r=null)})))}function T(t){x(t),ckdc.preview.extraImagesHandling(t),t.addClass("selected"),t.prevAll().addClass("beforeSelectedItem"),t.nextAll().addClass("afterSelectedItem"),m(t)?(o.addClass("firstItem"),t.addClass("firstItem")):w(t)&&(o.addClass("lastItem"),t.addClass("lastItem")),t.one("mouseleave",(function(t){var n=e(t.currentTarget);c.removeClass("hover"),n.removeClass("selected"),o.removeClass("firstItem"),n.removeClass("firstItem"),o.removeClass("lastItem"),n.removeClass("lastItem"),n.prevAll().removeClass("beforeSelectedItem"),n.nextAll().removeClass("afterSelectedItem")}))}u()}(this)}))})),ckdc.window.resize((function(){!function(){ckdc.orientation;var t=e(".carousel-dual-orientation",ckdc.body);if(!t.length)return;t.each((function(){i(e(this))}))}()})),t=function(e){e.extend({bez:function(t,n){if(e.isArray(t)&&(t="bez_"+(n=t).join("_").replace(/\./g,"p")),"function"!=typeof e.easing[t]){var i=function(e,t){var n=[null,null],i=[null,null],a=[null,null],o=function(o,s){return a[s]=3*e[s],i[s]=3*(t[s]-e[s])-a[s],n[s]=1-a[s]-i[s],o*(a[s]+o*(i[s]+o*n[s]))},s=function(e){return a[0]+e*(2*i[0]+3*n[0]*e)};return function(e){return o(function(e){for(var t,n=e,i=0;++i<14&&(t=o(n,0)-e,!(Math.abs(t)<.001));)n-=t/s(n);return n}(e),1)}};e.easing[t]=function(e,t,a,o,s){return o*i([n[0],n[1]],[n[2],n[3]])(t/s)+a}}return t}})},"object"==typeof exports?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}function i(t){a(t);var n=e(".preview-item",t);n.length&&n.each((function(){a(e(this))}))}function a(e){var t="orientation-"+ckdc.orientation;e.hasClass(t)||e.removeClass("orientation-vertical orientation-horizontal").addClass(t)}}
1));
2//# sourceMappingURL=preview-carousel.min.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.