PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 3.1.4
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v3.1.4
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
ultimate-store-kit / src / js / widgets / image-hotspot.js

image-hotspot.js in Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder 3.1.4, at src/js/widgets/image-hotspot.js

58 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ($, elementor) {
2
3 'use strict';
4
5 var widgetImageHotspot = function ($scope, $) {
6
7 var $imageHotspot = $scope.find('.usk-image-hotspot'),
8 $settings = $imageHotspot.data('settings');
9
10 if (!$imageHotspot.length) {
11 return;
12 }
13
14 if ($settings.image_hotspot_layout === 'slider') {
15
16 var $thumbs = $imageHotspot.find('.usk-image-hotspot-thumbs');
17
18 const Swiper = elementorFrontend.utils.swiper;
19 initSwiper();
20 async function initSwiper() {
21
22 var sliderThumbs = await new Swiper($thumbs, $settings);
23
24 var $imageHotspotContainer = $imageHotspot.find('.usk-image-hotspot-main');
25
26 var mainSlider = await new Swiper($imageHotspotContainer, {
27 slidesPerView: 1,
28 effect: $settings.sliderEffect,
29 fadeEffect: {
30 crossFade: true
31 },
32 thumbs: {
33 swiper: sliderThumbs,
34 },
35 });
36
37 };
38
39 }
40
41 var $tooltip = $imageHotspot.find('.bdt-tippy-tooltip');
42
43 $tooltip.each( function( index ) {
44 tippy( this, {
45 allowHTML: true,
46 interactive: true,
47 theme: 'bdt-tippy-' + $settings.id,
48 appendTo: document.body,
49 });
50 });
51
52 };
53
54 jQuery(window).on('elementor/frontend/init', function () {
55 elementorFrontend.hooks.addAction('frontend/element_ready/usk-image-hotspot.default', widgetImageHotspot);
56 });
57
58 }(jQuery, window.elementorFrontend));