# ultimate-store-kit/3.1.4/src/js/widgets/image-hotspot.js

Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder, version 3.1.4. 58 lines.

- Page: https://pluginprobe.com/plugins/ultimate-store-kit/3.1.4/code/src/js/widgets/image-hotspot.js
- Raw: https://pluginprobe.com/plugins/ultimate-store-kit/3.1.4/raw/src/js/widgets/image-hotspot.js
- Modified: 2026-09-17T12:29:12+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-store-kit/3.1.4/code/src/js/widgets/image-hotspot.js#L10-L20`.

```javascript
(function ($, elementor) {

    'use strict';

    var widgetImageHotspot = function ($scope, $) {

        var $imageHotspot = $scope.find('.usk-image-hotspot'),
            $settings = $imageHotspot.data('settings');

        if (!$imageHotspot.length) {
            return;
        }

        if ($settings.image_hotspot_layout === 'slider') {

            var $thumbs = $imageHotspot.find('.usk-image-hotspot-thumbs');
            
            const Swiper = elementorFrontend.utils.swiper;
            initSwiper();
            async function initSwiper() {
                
                var sliderThumbs = await new Swiper($thumbs, $settings);

                var $imageHotspotContainer = $imageHotspot.find('.usk-image-hotspot-main');

                var mainSlider = await new Swiper($imageHotspotContainer, {
                    slidesPerView: 1,
                    effect: $settings.sliderEffect,
                    fadeEffect: {
                        crossFade: true
                    },
                    thumbs: {
                        swiper: sliderThumbs,
                    },
                });

            };
            
        }

        var $tooltip = $imageHotspot.find('.bdt-tippy-tooltip');
		
		$tooltip.each( function( index ) {
			tippy( this, {
				allowHTML: true,
				interactive: true,
				theme: 'bdt-tippy-' + $settings.id,
                appendTo: document.body,
			});				
		});

    };

    jQuery(window).on('elementor/frontend/init', function () {
        elementorFrontend.hooks.addAction('frontend/element_ready/usk-image-hotspot.default', widgetImageHotspot);
    });

}(jQuery, window.elementorFrontend));
```
