Viewing File: /home/fshjisk/udnos/wp-content/plugins/fusion-builder/assets/js/min/general/fusion-testimonials.js

!function(e){"use strict";function i(e,i){var t,n=e.children(".review").first(),a=e.children(".active-testimonial");a.length?(a.removeClass("active-testimonial"),(t=a.next()).length?t.addClass("active-testimonial"):n.addClass("active-testimonial")):n.addClass("active-testimonial"),e.css("height",e.children(".active-testimonial").height()),i.length&&(i.removeClass("activeSlide"),i.eq(e.children().index(e.children(".active-testimonial"))).addClass("activeSlide"))}e.fn.initTestimonials=function(){e(this).each(function(){var t=fusion.getAnimationIntersectionData(e(this)),n=new IntersectionObserver(function(t,a){e.each(t,function(t,a){var s=e(a.target),r=s.parent(),o=r.children(".testimonial-pagination"),l=o.length?o.children():{};a.isIntersecting&&(s.css("height",s.children(".active-testimonial").height()),r.data("speed")&&r.attr("data-interval",setInterval(function(){i(s,l)},r.data("speed"))),l.length&&l.on("click",function(t){t.preventDefault(),l.removeClass("activeSlide"),e(this).addClass("activeSlide"),s.children().removeClass("active-testimonial").eq(l.index(e(this))).addClass("active-testimonial"),s.css("height",s.children(".active-testimonial").height()),r.data("speed")&&(clearInterval(parseInt(r.attr("data-interval"))),r.attr("data-interval",setInterval(function(){i(s,l)},r.data("speed"))))}),n.unobserve(a.target))})},t);e(this).each(function(){n.observe(this)})})}}(jQuery),jQuery(window).on("load fusion-element-render-fusion_testimonials",function(e,i){var t=void 0!==i?jQuery('div[data-cid="'+i+'"]').find(".reviews"):jQuery(".fusion-testimonials .reviews");void 0===i||t.length||(t=jQuery('div[data-cid="'+i+'"]').parents(".fusion-testimonials").first().find(".reviews")),t.initTestimonials(),jQuery(window).on("fusion-resize-horizontal",function(){jQuery(".fusion-testimonials .reviews").each(function(){jQuery(this).css("height",jQuery(this).children(".active-testimonial").height())})})}),jQuery(window).on("fusion-dynamic-content-render",function(e,i){var t=jQuery(i).find(".fusion-testimonials .reviews");0<t.length&&t.each(function(){jQuery(this).css("height",jQuery(this).children(".active-testimonial").height())})});
Back to Directory File Manager