fbpx

Pay-Per-Call Telephone Answering Service Available 24/7/365 to handle your calls

' $this.find('.as-slider-background').remove() $(this).prepend(bgHTML) var backgrounds = $this.find('.as-slider-background img') backgrounds.eq(0).addClass('currentForward') setInterval(function(){ currentSlide = $this.find('.as-side-slider .swiper-slide-active').attr('data-swiper-slide-index') if(previousSlide != currentSlide) { if( previousSlide < currentSlide ){ forward = true } if( previousSlide > currentSlide ){ forward = false } if( previousSlide == slideNumber - 1 && currentSlide == 0 ){ forward = true } if( previousSlide == 0 && currentSlide == slideNumber - 1 ){ forward = false } textContainer.each(function(){ var texts = $(this).find('.elementor-widget') $(this).css('--h', texts.eq(currentSlide).height()+'px') texts.removeClass('prev next currentUp currentDown') backgrounds.removeClass('prev currentBackward currentForward') backgrounds.eq(previousSlide).addClass('prev') if(forward) { texts.eq(previousSlide).addClass('prev') texts.eq(currentSlide).addClass('currentUp') backgrounds.eq(currentSlide).addClass('currentForward') }else{ texts.eq(previousSlide).addClass('next') texts.eq(currentSlide).addClass('currentDown') backgrounds.eq(currentSlide).addClass('currentBackward') } }) $this.find('.as-bar .dot').removeClass('active') $this.find('.as-bar .dot').eq(currentSlide).addClass('active') } previousSlide = currentSlide }, 500) $this.find('.as-bar .dot').on('click', function(){ var index = $(this).index() $this.find('.as-side-slider .swiper-pagination-bullet').eq(index).trigger('click') $this.find('.as-side-slider .swiper-container').trigger('mouseleave') }) $this.find('.as-slider-left').on('click', function(){ $this.find('.as-side-slider .elementor-swiper-button-prev').trigger('click') $this.find('.as-side-slider .elementor-swiper').trigger('mouseleave') }) $this.find('.as-slider-right').on('click', function(){ $this.find('.as-side-slider .elementor-swiper-button-next').trigger('click') $this.find('.as-side-slider .elementor-swiper').trigger('mouseleave') }) $this.find('.as-slider-left a, .as-slider-right a').on('click', function(e){ e.preventDefault() }) }) }) $(window).on('resize', function(){ $('.as-slider').each(function(){ var textContainer = $(this).find('.as-changing-widget') textContainer.each(function(){ var texts = $(this).find('.elementor-widget.currentUp, .elementor-widget.currentDown') $(this).css('--h', texts.height()+'px') }) }) })