PageSourceSearch

https://kinghornagency.com/wp-content/cache/min/1/wp-content/theme…nectar-testimonial-slider.js?ver=1789668828

js kinghornagency.com collected 2026-09-29 05:41:54 UTC 12,631 bytes, 1 lines download raw bytes

1!function(t){"use strict";function i(t,i,e,n){this.el=t,this.type=i,this.resizeVideoToCover=e,this.fullWidthContentColumns=n,this.flickityEl=null,this.createTestimonialControls()}i.prototype.createTestimonialControls=function(){var i,e,n,l=t("body.vc_editor").length>0?"> div":"blockquote";if("multiple_visible"!=this.type&&"multiple_visible_minimal"!=this.type)if(this.el.animate({opacity:"1"},800),this.el.find("blockquote").length>1){this.el.find(".controls, .testimonial-next-prev").remove(),this.el.append('<div class="controls"><ul></ul></div>');var s=this.el.find("blockquote").length;i=this.el;for(var a=0;a<s;a++)this.el.is('[data-style="minimal"]')?i.find(".controls ul").append("<li>"+(a+1)+"</li>"):i.find(".controls ul").append('<li><button type="button" class="pagination-switch" aria-label="'+(a+1)+'"></button></li>');if(this.el.is('[data-style="minimal"]')){if(this.el.append('<div class="testimonial-next-prev"><a href="#" role="button" aria-label="'+(window.nectar_front_i18n?nectar_front_i18n.previous:"Previous")+'" class="prev fa fa-angle-left"></a><a href="#" role="button" aria-label="'+(window.nectar_front_i18n?nectar_front_i18n.next:"Next")+'" class="next fa fa-angle-right"></a></div>'),this.el.find(".testimonial-next-prev a").on("click",this.minimalNextPrevSelect),0==this.el.find(".active").length&&(this.el.find(".slides "+l+":first-child").addClass("active").css({opacity:"1",transform:"translateX(0px)"}).css("z-index","20"),this.el.hasClass("disable-height-animation")||this.el.find(".slides").css({height:this.el.find(".slides "+l+":first-child").height()+40+"px"})),this.el.attr("data-autorotate").length>0){i=this.el,e=parseInt(this.el.attr("data-autorotate"))<100?4e3:parseInt(this.el.attr("data-autorotate")),n=this;var r=setInterval(function(){n.testimonialRotate(i)},e)}this.el.find(".testimonial-next-prev a").on("click",function(t){void 0!==t.clientX&&clearInterval(r)}),this.el.find(".controls ul").wrap('<div class="control-wrap" />'),this.el.find(".controls ul").css("width",20*this.el.find(".controls ul li").length+1+"px"),this.el.find(".controls").append('<span class="out-of">/</span><span class="total">'+this.el.find("blockquote").length+"</span>"),this.el.swipe({swipeLeft:function(t){return i.find(".testimonial-next-prev .next").trigger("click"),t.stopImmediatePropagation(),clearInterval(r),!1},swipeRight:function(t){return i.find(".testimonial-next-prev .prev").trigger("click"),t.stopImmediatePropagation(),clearInterval(r),!1}})}if(!this.el.is('[data-style="minimal"]')){if(this.el.find(".controls ul li").on("click",this.defaultPaginationSelect),this.el.find(".controls ul li").first().trigger("click"),this.el.attr("data-autorotate").length>0){e=parseInt(this.el.attr("data-autorotate"))<100?4e3:parseInt(this.el.attr("data-autorotate")),i=this.el,n=this;r=setInterval(function(){n.testimonialRotate(i)},e)}this.el.find(".controls li").on("click",function(t){void 0!==t.clientX&&clearInterval(r)}),this.el.swipe({swipeLeft:function(t){return i.find(".controls ul li .pagination-switch.active").parent().next("li").find(".pagination-switch").trigger("click"),t.stopImmediatePropagation(),clearInterval(r),!1},swipeRight:function(t){return i.find(".controls ul li .pagination-switch.active").parent().prev("li").find(".pagination-switch").trigger("click"),t.stopImmediatePropagation(),clearInterval(r),!1}})}}else if(0==this.el.find(".controls").length){var o=this.el.find(".slides blockquote").height();this.el.find(".slides blockquote").css({opacity:"0",transform:"translateX(-25px)","z-index":"1"}),this.el.find(".slides blockquote").css({opacity:"1",transform:"translateX(0px)"}).css("z-index","20"),this.el.find(".slides").stop(!0,!0).animate({height:o+20+"px"},450,"easeOutCubic")}if("multiple_visible"==this.type||"multiple_visible_minimal"==this.type){var d=t("#nectar_fullscreen_rows").length>0;!window.nectarDOMInfo.usingFrontEndEditor&&"IntersectionObserver"in window&&!1===d?this.lazyFlickityInit():this.flickityInit()}var c=window.nectar_front_i18n&&nectar_front_i18n.slide?nectar_front_i18n.slide:"slide";this.el.find("blockquote").each(function(i){t(this).attr({role:"group","aria-roledescription":c})}),this.el.children(".nectar-slide-live").remove(),this.$liveRegion=t('<div class="screen-reader-text nectar-slide-live" aria-live="polite" aria-atomic="true"></div>'),this.el.append(this.$liveRegion);var h=this;"multiple_visible"!=this.type&&"multiple_visible_minimal"!=this.type&&(this.el.attr("tabindex","0"),this.el.on("key
1down",function(t){var i;t.target===t.currentTarget&&(37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),37===t.keyCode?h.el.is('[data-style="minimal"]')?h.el.find(".testimonial-next-prev .prev").trigger("click"):(i=h.el.find(".controls ul li .pagination-switch.active").parent()).prev("li").length?i.prev("li").trigger("click"):h.el.find(".controls ul li:last").trigger("click"):h.el.is('[data-style="minimal"]')?h.el.find(".testimonial-next-prev .next").trigger("click"):(i=h.el.find(".controls ul li .pagination-switch.active").parent()).next("li").length?i.next("li").trigger("click"):h.el.find(".controls ul li:first").trigger("click")))})),t("body").on("click",'.testimonial_slider:not([data-style*="multiple_visible"]):not([data-style="minimal"]) .controls li, .testimonial_slider[data-style="minimal"] .testimonial-next-prev a',function(){return h.resizeVideoToCover(),!1})},i.prototype.flickityInit=function(){var i=this,e=this.el,n=e.attr("data-autorotate").length>1&&parseInt(e.attr("data-autorotate"))>100&&parseInt(e.attr("data-autorotate"));0==e.find("img").length&&t("body"),"multiple_visible_minimal"!=this.el.attr("data-style")?this.el.find("blockquote").each(function(){t(this).find(".image-icon").insertBefore(t(this).find(".testimonial-name"))}):this.el.find("blockquote").length>4&&this.el.addClass("has-alf");var l="multiple_visible_minimal"==this.el.attr("data-style"),s=!(t("body.vc_editor").length>0),a=t("body.vc_editor").length>0,r=!0,o=!1;this.el.is("[data-controls]")&&"next_prev_arrows"==this.el.attr("data-controls")&&(o=!0,r=!1),this.flickityEl=e.find(".slides").flickity({contain:!0,draggable:s,groupCells:l,lazyLoad:!1,imagesLoaded:!0,percentPosition:!0,prevNextButtons:o,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30},pageDots:r,resize:!0,setGallerySize:!0,wrapAround:!0,autoPlay:n,pauseAutoPlayOnHover:a,accessibility:!1}),this.flickityEl.find(".vc_element.is-selected > blockquote").length>0&&(this.flickityEl.find(".vc_element.is-selected > blockquote").addClass("is-selected"),this.flickityEl.on("select.flickity",function(){i.flickityEl.find(".vc_element > blockquote").removeClass("is-selected"),i.flickityEl.find(".vc_element.is-selected > blockquote").addClass("is-selected")}));var d=this.el.is("[data-shadow]")?this.el.attr("data-shadow"):"";"multiple_visible"==i.type&&d.length>0&&i.flickityEl.find("blockquote p").each(function(){t(this)[0].style=d}),e.css("opacity","1"),e.attr("tabindex")||e.attr("tabindex","0"),e.on("keydown",function(t){t.target===t.currentTarget&&(37===t.keyCode?(t.preventDefault(),i.flickityEl.flickity("previous")):39===t.keyCode&&(t.preventDefault(),i.flickityEl.flickity("next")))});var c=i.flickityEl.data("flickity");c&&i.flickityEl.on("select.flickity",function(){var t=c.slides?c.slides.length:0,i=e.find("[aria-live]");if(i.length&&t>0){var n=window.nectar_front_i18n&&nectar_front_i18n.slide_of?nectar_front_i18n.slide_of.replace("%1$s",c.selectedIndex+1).replace("%2$s",t):c.selectedIndex+1+" / "+t;i.text(n)}}),"multiple_visible_minimal"==this.type&&(this.testimonialSliderHeightMinimalMult(),setTimeout(function(){i.flickityEl.flickity("resize")},100))},i.prototype.isSafari=function(){return-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome")},i.prototype.lazyFlickityInit=function(){var t=this;this.observer=new IntersectionObserver(function(i){i.forEach(function(i){i.isIntersecting&&(t.flickityInit(),t.observer.unobserve(i.target))})},{root:this.isSafari()?null:document,rootMargin:"400px 0px 400px 0px",threshold:0}),this.observer.observe(this.el[0])},i.prototype.defaultPaginationSelect=function(i){var e=t(i.currentTarget);if(e.find(".pagination-switch").hasClass("active"))return!1;var n=t("body.vc_editor").length>0?"> div":"blockquote",l=e.index(),s=e.parents(".testimonial_slider").find(".slides blockquote").eq(l).height();e.parents(".testimonial_slider").find(".controls .pagination-switch").removeClass("active"),e.find(".pagination-switch").addClass("active"),e.parents(".testimonial_slider").find(".slides "+n).addClass("no-trans"),e.parents(".testimonial_slider").find(".slides "+n).css({opacity:"0",transform:"translateX(-25px)","z-index":"1"}),e.parents(".testimonial_slider").find(".slides "+n).eq(l).removeClass("no-trans").css({opacity:"1",transform:"translateX(0px)"}).css("z-index","20"),e.parents(".testimonial_slider:not(.disable-height-animation)").find(".slides").stop(!0,!0).animate({height:s+40+"px"},450,"easeOutCubic");var a=e.parents(".testimonial_slider"),r=a.find(".slides blockquote").length,o=a.find("[aria-live]");
1if(o.length&&r>0){var d=window.nectar_front_i18n&&nectar_front_i18n.slide_of?nectar_front_i18n.slide_of.replace("%1$s",l+1).replace("%2$s",r):l+1+" / "+r;o.text(d)}},i.prototype.minimalNextPrevSelect=function(i){var e,n=t(i.currentTarget),l=t("body.vc_editor").length>0?"> div":"blockquote",s=n.parents(".testimonial_slider").find(".slides "+l+".active").index(),a=s;n.parents(".testimonial_slider").find(".slides "+l).addClass("no-trans"),n.parents(".testimonial_slider").find(".slides "+l).css({opacity:"0",transform:"translateX(-25px)","z-index":"1"}),n.parents(".testimonial_slider").find(".slides "+l).eq(s).removeClass("active"),n.hasClass("next")?(a=s+1>=n.parents(".testimonial_slider").find(".slides "+l).length?0:s+1,e=n.parents(".testimonial_slider").find(".slides "+l).eq(a).height(),n.parents(".testimonial_slider").find(".slides "+l).eq(a).addClass("active").removeClass("no-trans").css({opacity:"1",transform:"translateX(0px)"}).css("z-index","20"),n.parents(".testimonial_slider").find(".control-wrap ul").css({transform:"translateX(-"+20*a+"px)"})):(a=s-1==-1?n.parents(".testimonial_slider").find(".slides "+l).length-1:s-1,e=n.parents(".testimonial_slider").find(".slides "+l).eq(s-1).height(),n.parents(".testimonial_slider").find(".slides "+l).eq(s-1).addClass("active").removeClass("no-trans").css({opacity:"1",transform:"translateX(0px)"}).css("z-index","20"),n.parents(".testimonial_slider").find(".control-wrap ul").css({transform:"translateX(-"+20*a+"px)"})),n.parents(".testimonial_slider:not(.disable-height-animation)").find(".slides").stop(!0,!0).animate({height:e+40+"px"},450,"easeOutCubic");var r=n.parents(".testimonial_slider"),o=r.find(".slides blockquote").length,d=r.find("[aria-live]");if(d.length&&o>0){var c=window.nectar_front_i18n&&nectar_front_i18n.slide_of?nectar_front_i18n.slide_of.replace("%1$s",a+1).replace("%2$s",o):a+1+" / "+o;d.text(c)}return!1},i.prototype.testimonialRotate=function(){var t=this.el.find("li").length,i=this.el.find(".pagination-switch.active").parent().index();this.el.parents(".toggle").length>0&&this.el.parents(".toggle").hasClass("open"),this.el.is('[data-style="minimal"]')?this.el.find(".testimonial-next-prev .next").trigger("click"):i+1==t?this.el.find("ul li:first-child").trigger("click"):this.el.find(".pagination-switch.active").parent().next("li").trigger("click")},i.prototype.testimonialHeightResize=function(){if(!this.el.is(".disable-height-animation")&&!this.el.is('[data-style*="multiple_visible"]')){var i,e=t("body.vc_editor").length>0?".slides > div":".slides blockquote";i=this.el.is('[data-style="minimal"]')?this.el.find(e+".active").index():this.el.find(".controls ul li .pagination-switch.active").parent().index();var n=this.el.find(e).eq(i).height();this.el.find(".slides").stop(!0,!0).css({height:n+40+"px"})}},i.prototype.testimonialSliderHeight=function(){if(this.el.is(".disable-height-animation")&&!this.el.is('[data-style*="multiple_visible"]')){var i=0;this.el.find("blockquote").each(function(){i=t(this).height()>i?t(this).height():i}),0==i&&(i=100),this.el.find(".slides").css("height",i+40+"px"),this.el.animate({opacity:"1"}),this.fullWidthContentColumns()}},i.prototype.testimonialSliderHeightMinimalMult=function(){if("multiple_visible_minimal"==this.type){var i=0;this.el.find("blockquote > .inner").css("height","auto"),this.el.find("blockquote > .inner").each(function(){i=t(this).outerHeight()>i?t(this).outerHeight():i}),0==i&&(i=200),this.el.find("blockquote > .inner").css("height",i+"px")}},window.NectarTestimonialSlider=i}(jQuery)

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.