# ultimate-post-kit/4.2.1/assets/js/widgets/upk-carbon-slider.min.js

Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider &amp; Blog Layout Widgets, version 4.2.1. 1 lines.

- Page: https://pluginprobe.com/plugins/ultimate-post-kit/4.2.1/code/assets/js/widgets/upk-carbon-slider.min.js
- Raw: https://pluginprobe.com/plugins/ultimate-post-kit/4.2.1/raw/assets/js/widgets/upk-carbon-slider.min.js
- Modified: 2026-08-08T11:41:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ultimate-post-kit/4.2.1/code/assets/js/widgets/upk-carbon-slider.min.js#L10-L20`.

```javascript
!function(e,n){"use strict";var o=function(e,n){var o=e.find(".upk-carbon-main");if(!o.length)return;var r=o.find(".swiper-carousel"),i=o.data("settings");const t=elementorFrontend.utils.swiper;!async function(){var o=await new t(r,i);i.pauseOnHover&&n(r).hover((function(){this.swiper.autoplay.stop()}),(function(){this.swiper.autoplay.start()}));var d=e.find(".upk-carbon-slider-wrap").find(".upk-carbon-thumbs"),s=d.find(".swiper-wrapper > .swiper-slide").length,a=Math.max(1,Math.min(s||1,4)),l=!!i.loop,p=await new t(d,{spaceBetween:0,slidesPerView:1,touchRatio:.2,slideToClickedSlide:!0,centeredSlides:!0,loop:l,speed:i.speed?i.speed:500,loopedSlides:a,breakpoints:{768:{slidesPerView:3,spaceBetween:20}}});function c(){o.destroyed||p.destroyed||p.realIndex!==o.realIndex&&(l?p.slideToLoop(o.realIndex):p.slideTo(o.realIndex))}o.controller.control=p,o.on("slideChangeTransitionEnd",c),p.on("slideChangeTransitionEnd",(function(){o.destroyed||p.destroyed||p.realIndex!==o.realIndex&&(l?o.slideToLoop(p.realIndex):o.slideTo(p.realIndex))})),c()}()};jQuery(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/upk-carbon-slider.default",o)}))}(jQuery,window.elementorFrontend);
```
