PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.5.0
Spider Elements – Premium Elementor Widgets & Addons Library v1.5.0
trunk 1.0.0 1.1.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.7.0 1.8.0 1.9.0
spider-elements / assets / js / elementor-widgets.js
spider-elements / assets / js Last commit date
admin.js 1 year ago ajax-chimp.js 1 year ago elementor-widgets.js 1 year ago scripts.js 1 year ago
elementor-widgets.js
823 lines
1 ;(function ($, elementor) {
2 "use strict";
3
4 const $window = $(elementor);
5
6 const spiderElements = {
7 onInit: function () {
8 const E_FRONT = elementorFrontend;
9 const widgetHandlersMap = {
10 "landpagy_pricing_table_tabs.default": spiderElements.pricing_table_tabs,
11 "docy_tabs.default": spiderElements.tabs,
12 "docy_testimonial.default": spiderElements.testimonial,
13 "docly_alerts_box.default": spiderElements.alertBox,
14 "docy_videos_playlist.default": spiderElements.videoPlaylist,
15 "docy_team_carousel.default": spiderElements.teamslider,
16 "spe_after_before_widget.default": spiderElements.beforeAfter,
17 "docy_video_popup.default": spiderElements.videoPopup,
18 "spe_instagram.default": spiderElements.instagramFeed,
19 "spel_accordion.default": spiderElements.accordions,
20 "docly_cheatsheet.default": spiderElements.cheatsheet,
21 "docy_blog_grid.default": spiderElements.blogGrid,
22 };
23
24 $.each(widgetHandlersMap, function (widgetName, callback) {
25 E_FRONT.hooks.addAction(
26 "frontend/element_ready/" + widgetName,
27 callback
28 );
29 });
30 },
31
32 //======================== Blog Grid =========================== //
33 blogGrid: function ($scope) {
34
35
36 let blogGrid = $scope.find(".category-slider-one");
37 let dataRtlblog = blogGrid.data("rtl");
38 if (blogGrid.length > 0) {
39 blogGrid.slick({
40 rtl: dataRtlblog,
41 dots: false,
42 arrows: true,
43 lazyLoad: 'ondemand',
44 prevArrow: $('.prev_d'),
45 nextArrow: $('.next_d'),
46 centerPadding: '0px',
47 slidesToShow: 4,
48 slidesToScroll: 1,
49 autoplay: true,
50 autoplaySpeed: 3000,
51 responsive: [
52 {
53 breakpoint: 992,
54 settings: {
55 slidesToShow: 3
56 }
57 },
58 {
59 breakpoint: 768,
60 settings: {
61 slidesToShow: 2
62 }
63 },
64 {
65 breakpoint: 576,
66 settings: {
67 slidesToShow: 1
68 }
69 }
70 ]
71 });
72 }
73
74 },
75
76
77 /*============ cheatsheet js ==============*/
78 cheatsheet: function ($scope) {
79 let cheatsht = $scope.find(".card-header button");
80 cheatsht.on("click", function (event) {
81 event.preventDefault(); // Prevent default behavior
82 var $this = $(this);
83 var $parent = $this.parents();
84 var $collapses = $parent.find("> .collapse").first();
85 $(this).toggleClass("active");
86 $collapses.slideToggle(300);
87 return false;
88 });
89
90 // Check if elementor is in edit mode
91 if (window.elementor && window.elementor.hasOwnProperty('frontend') && window.elementorFrontend.isEditMode()) {
92 // Check if serial number toggle is enabled
93 let enableSerial = $scope.find('[data-setting="enable_serial_numbers"]').val() === 'yes';
94 let enableNumberCircle = $scope.find('[data-setting="enable_number_circle"]').val() === 'yes';
95
96 if (enableSerial || enableNumberCircle) {
97 // Update serial numbers dynamically based on index
98 setTimeout(function() {
99 $scope.find('.elementor-repeater-fields').each(function(index) {
100 // Dynamically apply serial numbers using the index value
101 if (enableSerial) {
102 $(this).find('.cheatsheet_num').text('#' + (index + 1));
103 }
104 if (enableNumberCircle) {
105 $(this).find('.number-circle').text('#' + (index + 1));
106 }
107 });
108 }, 100);
109
110 // Update serial numbers when new items are added
111 window.elementor.on('click', '.elementor-repeater-add', function() {
112 setTimeout(function() {
113 $scope.find('.elementor-repeater-fields').each(function(index) {
114 if (enableSerial) {
115 $(this).find('.cheatsheet_num').text('#' + (index + 1));
116 }
117 if (enableNumberCircle) {
118 $(this).find('.number-circle').text('#' + (index + 1));
119 }
120 });
121 }, 100);
122 });
123 }
124 }
125 },
126
127 //=============== Accordion ===============//
128 accordions: function ($scope) {
129 let cardHeader = $scope.find(".accordion_inner > .card-header");
130
131 cardHeader.on("click", function () {
132 let $this = $(this);
133 let $parent = $this.parent();
134 let $collapse = $parent.find("> .collapse").first();
135
136 $collapse.slideToggle(300);
137 $parent.siblings().find("> .collapse").hide(300);
138
139 if ($parent.hasClass("collapsed")) {
140 $parent.removeClass("collapsed");
141 } else {
142 cardHeader.parent().removeClass("collapsed");
143 $parent.addClass("collapsed");
144 }
145
146 return false;
147 });
148 },
149
150 //======================== Instagram Feed =========================== //
151 instagramFeed: function ($scope) {
152 let instagramFeed = $scope.find(".instagram-feed-active");
153
154 if (instagramFeed.length > 0) {
155 var portfolio = new Swiper(".instagram-feed-active", {
156 slidesPerView: 1,
157 spaceBetween: 24,
158 loop: true,
159 navigation: {
160 nextEl: ".swiper-button-next",
161 prevEl: ".swiper-button-prev",
162 },
163 breakpoints: {
164 480: {
165 slidesPerView: 2,
166 },
167 768: {
168 slidesPerView: 3,
169 },
170 992: {
171 slidesPerView: 4,
172 },
173 1200: {
174 slidesPerView: 5,
175 },
176 },
177 });
178 }
179 },
180
181 //============================== Start Before After =============================//
182 beforeAfter: function ($scope) {
183 let beforeAfter = $scope.find(".beforeAfter");
184
185 if (beforeAfter.length > 0) {
186 beforeAfter.beforeAfter({
187 movable: true,
188 clickMove: true,
189 position: 49.65,
190 separatorColor: "#fafafa",
191 bulletColor: "#fff",
192 });
193 }
194 }, //End Before After
195
196 //============================== Video Popup =============================//
197 videoPopup: function ($scope) {
198 let fancy = $scope.find(".fancybox");
199 if (fancy.length) {
200 fancy.fancybox({
201 arrows: true,
202 buttons: [
203 "zoom",
204 "slideShow",
205 "thumbs",
206 "close",
207 ],
208 animationEffect: "zoom-in-out",
209 transitionEffect: "zoom-in-out",
210 });
211 }
212
213 // Layout 03
214 let textElement = document.querySelector(".btn-circle .text p");
215 if (textElement) {
216 textElement.innerHTML = textElement.innerText // Split the text into characters and apply rotation to each character
217 .split("")
218 .map(
219 (char, i) =>
220 `<span style="transform:rotate(${i * 9.5}deg)">${char}</span>`
221 )
222 .join("");
223 }
224 }, //End Video Popup
225
226 //============================== Team Slider =============================//
227 teamslider: function ($scope) {
228
229 let teamSlider = $scope.find(".expert-slider-one");
230 let dataRtlTeam1 = teamSlider.data("rtl");
231 if (teamSlider.length) {
232 teamSlider.slick({
233 rtl: dataRtlTeam1,
234 arrows: true,
235 lazyLoad: "ondemand",
236 prevArrow: $(".prev_a"),
237 nextArrow: $(".next_a"),
238 centerPadding: "0px",
239 slidesToShow: 4,
240 slidesToScroll: 1,
241 autoplay: true,
242 autoplaySpeed: 3000,
243 responsive: [
244 {
245 breakpoint: 1200,
246 settings: {
247 slidesToShow: 3,
248 },
249 },
250 {
251 breakpoint: 768,
252 settings: {
253 slidesToShow: 2,
254 },
255 },
256 {
257 breakpoint: 480,
258 settings: {
259 slidesToShow: 1,
260 },
261 },
262 ],
263 });
264 }
265
266 let teamSlider2 = $scope.find(".expert-slider-two");
267 let dataRtlTeam2 = teamSlider2.data("rtl");
268 if (teamSlider2.length) {
269 teamSlider2.slick({
270 rtl: dataRtlTeam2,
271 dots: true,
272 arrows: false,
273 lazyLoad: "ondemand",
274 centerPadding: "0px",
275 slidesToShow: 4,
276 slidesToScroll: 2,
277 autoplay: false,
278 autoplaySpeed: 3000,
279 responsive: [
280 {
281 breakpoint: 1200,
282 settings: {
283 slidesToShow: 3,
284 },
285 },
286 {
287 breakpoint: 992,
288 settings: {
289 slidesToShow: 2,
290 },
291 },
292 {
293 breakpoint: 576,
294 settings: {
295 slidesToShow: 1,
296 },
297 },
298 ],
299 });
300 }
301 }, //End Team Slider
302
303 //============================== Video Playlist =============================//
304 videoPlaylist: function ($scope) {
305 let video = $scope.find("#video_0");
306 setTimeout(function () {
307 $(".video_slider_area").addClass("loaded").css("height", "auto");
308 }, 3000);
309
310 video.addClass("show").addClass("active");
311 let containers = document.getElementsByClassName("artplayer-app");
312 if (containers.length > 0) {
313 for (var i = 0; i < containers.length; i++) {
314 new Artplayer({
315 container: containers[i],
316 url: containers[i].getAttribute("data-src"),
317 title: "Your Name",
318 pip: true,
319 screenshot: true,
320 flip: true,
321 fullscreen: true,
322 fullscreenWeb: true,
323 height: "500px",
324 });
325 }
326 }
327 },
328
329 //======================== Alert Box =========================== //
330 alertBox: function ($scope) {
331 $(".message_alert button.close").click(function () {
332 let btnId = $(this).attr("data-id");
333 $(".message_alert[data-id=" + btnId + "]").fadeOut();
334 });
335 },
336
337 //======================== Testimonial =========================== //
338 testimonial: function ($scope) {
339 let testimonialSlider = $scope.find(".doc_testimonial_slider");
340 let dataRtldoc = testimonialSlider.data("rtl");
341 let imageSlider = $scope.find(".doc_img_slider");
342 let dataRtlimg = imageSlider.data("rtl");
343
344 // Testi
345 if (testimonialSlider.length > 0) {
346 testimonialSlider.slick({
347 autoplay: true,
348 slidesToShow: 1,
349 slidesToScroll: 1,
350 rtl: dataRtlimg,
351 autoplaySpeed: 2000,
352 speed: 2000,
353 dots: true,
354 arrows: false,
355 asNavFor: imageSlider, //.doc_img_slider class
356 });
357 imageSlider.slick({
358 rtl: dataRtldoc,
359 slidesToShow: 1,
360 slidesToScroll: 1,
361 asNavFor: testimonialSlider, //.doc_testimonial_slider class
362 arrows: false,
363 fade: true,
364 focusOnSelect: true,
365 });
366 }
367
368 //==== testimonial Style 2
369 let feedbackSlider = $scope.find(".doc_feedback_slider");
370 let dataRtlfdb = feedbackSlider.data("rtl");
371 if (feedbackSlider.length > 0) {
372 feedbackSlider.slick({
373 rtl: dataRtlfdb,
374 autoplay: true,
375 slidesToShow: 1,
376 slidesToScroll: 1,
377 autoplaySpeed: 2000,
378 speed: 1000,
379 dots: false,
380 arrows: true,
381 prevArrow: ".prev",
382 nextArrow: ".next",
383 });
384 }
385
386 //==== Testimonial Style 3
387 let testimonialSliderInner = $scope.find(".testimonial-slider-inner");
388 if (testimonialSliderInner.length > 0) {
389 var Testimonial = new Swiper(".testimonial-slider-inner", {
390 slidesPerView: 1,
391 spaceBetween: 10,
392 loop: true,
393 navigation: {
394 nextEl: ".swiper-button-next",
395 prevEl: ".swiper-button-prev",
396 },
397 });
398 }
399
400 //=== Testimonial Style 4
401 let testimonialSlide4 = $scope.find(".testimonial-slide-4");
402 if (testimonialSlide4.length > 0) {
403 var swiper4 = new Swiper(".testimonial-slide-4", {
404 spaceBetween: 10,
405 loop: true,
406 navigation: false,
407 breakpoints: {
408 768: {
409 navigation: {
410 nextEl: ".swiper-button-next",
411 prevEl: ".swiper-button-prev",
412 },
413 },
414 },
415 });
416 }
417
418 //=== Testimonial Style 5
419 let testimonialSliderActive = $scope.find(".testimonial-slider-active");
420 if (testimonialSliderActive.length > 0) {
421 var swiper5 = new Swiper(".testimonial-slider-active", {
422 slidesPerView: 1,
423 spaceBetween: 24,
424 grabCursor: true,
425 loop: true,
426 speed: 500,
427 navigation: {
428 nextEl: ".swiper-button-next",
429 prevEl: ".swiper-button-prev",
430 },
431 breakpoints: {
432 576: {
433 slidesPerView: 2,
434 },
435 1200: {
436 slidesPerView: 4,
437 },
438 },
439 });
440 }
441
442 //== Testimonial Style 6
443 let testimonial6 = $scope.find(".feedback-slider-one");
444 let dataRtl6 = testimonial6.data("rtl");
445 if (testimonial6.length > 0) {
446 testimonial6.each(function () {
447 $(this).slick({
448 rtl: dataRtl6,
449 dots: false,
450 arrows: true,
451 lazyLoad: "ondemand",
452 prevArrow: $(this).parent().find(".prev_f"),
453 nextArrow: $(this).parent().find(".next_f"),
454 centerPadding: "0px",
455 slidesToShow: 2,
456 slidesToScroll: 1,
457 autoplay: true,
458 autoplaySpeed: 3000000,
459 responsive: [
460 {
461 breakpoint: 768,
462 settings: {
463 slidesToShow: 1,
464 },
465 },
466 ],
467 });
468 });
469 }
470
471 // feedback-slider-two slider js
472 let testimonial8 = $scope.find(".feedback-slider-two");
473 let dataRtl8 = testimonial8.data("rtl");
474 if (testimonial8.length) {
475 testimonial8.slick({
476 rtl: dataRtl8,
477 dots: true,
478 arrows: false,
479 lazyLoad: "ondemand",
480 centerPadding: "0px",
481 slidesToShow: 3,
482 slidesToScroll: 1,
483 autoplay: true,
484 autoplaySpeed: 300000,
485 responsive: [
486 {
487 breakpoint: 768,
488 settings: {
489 slidesToShow: 2,
490 },
491 },
492 {
493 breakpoint: 576,
494 settings: {
495 slidesToShow: 1,
496 },
497 },
498 ],
499 });
500 }
501
502 //=== Testimonial Style 10
503 let testimonial10_a = $scope.find(".feedback-slider-three-a");
504 let dataRtl10a = testimonial10_a.data("rtl");
505 let testimonial10_b = $scope.find(".feedback-slider-three-b");
506 let dataRtl10b = testimonial10_b.data("rtl");
507
508 if (testimonial10_a.length > 0) {
509 testimonial10_a.slick({
510 rtl: dataRtl10b,
511 dots: false,
512 arrows: true,
513 prevArrow: $('.prev_d'),
514 nextArrow: $('.next_d'),
515 lazyLoad: 'ondemand',
516 centerPadding: '0px',
517 slidesToShow: 1,
518 slidesToScroll: 1,
519 autoplay: true,
520 fade: true,
521 autoplaySpeed: 300000,
522 asNavFor: '.feedback-slider-three-b',
523 });
524 }
525
526 if (testimonial10_b.length > 0 ) {
527 testimonial10_b.slick({
528 rtl: dataRtl10a,
529 dots: true,
530 arrows: false,
531 lazyLoad: 'ondemand',
532 centerPadding: '0px',
533 slidesToShow: 3,
534 slidesToScroll: 1,
535 autoplay: true,
536 autoplaySpeed: 300000,
537 asNavFor: '.feedback-slider-three-a',
538 responsive: [
539 {
540 breakpoint: 992,
541 settings: {
542 slidesToShow: 2
543 }
544 },
545 {
546 breakpoint: 576,
547 settings: {
548 slidesToShow: 1
549 }
550 }
551 ]
552 });
553 }
554 },
555
556 //======================== Tabs =========================== //
557 tabs: function ($scope) {
558
559 // Tab Elements
560 let tabContainer = $scope.find(".spel-tab-menu");
561 let tabBtn = tabContainer.find("li button");
562 let tabContent = $scope.find(".tab-content .tab-box");
563 let nextBtn = $scope.find(".tab_arrow_btn.next");
564 let prevBtn = $scope.find(".tab_arrow_btn.previous");
565
566 let isAutoPlay = tabContainer.data("autoplay") === "yes"; // Assuming autoplay status is set in the container
567 let autoPlayInterval; // Declare autoplay interval
568 let currentIndex = tabBtn.index(tabBtn.filter(".active")); // Track current active tab
569
570 function changeActiveTab(newIndex) {
571 // Update active classes
572 tabBtn.removeClass("active");
573 tabContent.removeClass("show active");
574
575 let newTab = tabBtn.eq(newIndex);
576 let newContent = tabContent.eq(newIndex);
577
578 newTab.addClass("active");
579 newContent.addClass("show active");
580
581 // Update the current index for autoplay
582 currentIndex = newIndex;
583
584 // Scroll to the new active tab
585 scrollToTab(newTab);
586 }
587
588 function scrollToTab($activeTab) {
589 let containerWidth = tabContainer.width();
590 let scrollLeft = tabContainer.scrollLeft();
591 let tabLeft = $activeTab.position().left + scrollLeft;
592 let tabRight = tabLeft + $activeTab.outerWidth();
593
594 if (tabLeft < scrollLeft) {
595 tabContainer.animate({ scrollLeft: tabLeft }, 300);
596 } else if (tabRight > scrollLeft + containerWidth) {
597 tabContainer.animate({ scrollLeft: tabRight - containerWidth }, 300);
598 }
599 }
600
601 function startAutoplay() {
602 stopAutoplay(); // Ensure no duplicate intervals
603 autoPlayInterval = setInterval(() => {
604 let nextIndex = (currentIndex + 1) % tabBtn.length;
605 changeActiveTab(nextIndex);
606 }, 10000); // Set autoplay interval to 10 seconds
607 }
608
609 function stopAutoplay() {
610 clearInterval(autoPlayInterval);
611 }
612
613 // Handle manual tab switching
614 tabBtn.on("click", function (e) {
615 e.preventDefault();
616 let clickedIndex = tabBtn.index($(this));
617 changeActiveTab(clickedIndex);
618
619 if (isAutoPlay) {
620 stopAutoplay(); // Stop current autoplay
621 startAutoplay(); // Restart autoplay from the new tab
622 }
623 });
624
625 // Handle Next Button
626 nextBtn.on("click", function () {
627 let newIndex = (currentIndex + 1) % tabBtn.length;
628 changeActiveTab(newIndex);
629
630 if (isAutoPlay) {
631 stopAutoplay();
632 startAutoplay();
633 }
634 });
635
636 // Handle Previous Button
637 prevBtn.on("click", function () {
638 let newIndex = (currentIndex - 1 + tabBtn.length) % tabBtn.length;
639 changeActiveTab(newIndex);
640
641 if (isAutoPlay) {
642 stopAutoplay();
643 startAutoplay();
644 }
645 });
646
647 // Pause autoplay on hover over tab titles
648 tabBtn.on("mouseenter", function () {
649 if (isAutoPlay) {
650 stopAutoplay();
651 }
652 });
653
654 tabBtn.on("mouseleave", function () {
655 if (isAutoPlay) {
656 startAutoplay();
657 }
658 });
659
660 // Autoplay logic
661 if (isAutoPlay) {
662 startAutoplay();
663
664 // Pause autoplay on hover over tab titles
665 tabBtn.hover(
666 function () {
667 stopAutoplay();
668 },
669 function () {
670 startAutoplay();
671 }
672 );
673 }
674
675 // Center the active tab on load
676 let initialActiveTab = tabBtn.filter(".active");
677 if (initialActiveTab.length) {
678 scrollToTab(initialActiveTab);
679 }
680
681
682 // Tab Arrow Icons show/hide automatic when item is more than container
683 let tabSliderContainers = $scope.find(".tabs_sliders");
684 tabSliderContainers.each(function () {
685 let tabWrapWidth = $(this).outerWidth();
686 let totalWidth = 0;
687
688 let slideBtnLeft = $(this).find("#scroll_left_btn");
689 let slideBtnRight = $(this).find("#scroll_right_btn");
690 let navWrap = $(this).find(".slide_nav_tabs");
691 let navWrapItem = navWrap.children("li");
692
693 navWrapItem.each(function () {
694 totalWidth += $(this).outerWidth();
695 });
696
697 // Set initial scroll position to zero
698 navWrap.scrollLeft(0);
699
700 if (totalWidth > tabWrapWidth) {
701 slideBtnLeft.removeClass("inactive-left-arrow");
702 slideBtnRight.removeClass("inactive-right-arrow");
703 } else {
704 slideBtnLeft.addClass("inactive-left-arrow");
705 slideBtnRight.addClass("inactive-right-arrow");
706 }
707
708 function updateScrollerButtons() {
709 let scrollLeft = navWrap.scrollLeft();
710 let scrollWidth = navWrap[0].scrollWidth;
711 let navWidth = navWrap.outerWidth();
712
713 if (scrollLeft <= 0) {
714 slideBtnLeft.addClass("inactive-left-arrow");
715 } else {
716 slideBtnLeft.removeClass("inactive-left-arrow");
717 }
718
719 if (scrollLeft + navWidth >= scrollWidth - 1) {
720 slideBtnRight.addClass("inactive-right-arrow");
721 } else {
722 slideBtnRight.removeClass("inactive-right-arrow");
723 }
724 }
725
726 slideBtnRight.on("click", function () {
727 navWrap.animate({ scrollLeft: "+=200px" }, 300, function() {
728 updateScrollerButtons();
729 });
730 });
731
732 slideBtnLeft.on("click", function () {
733 navWrap.animate({ scrollLeft: "-=200px" }, 300, function() {
734 updateScrollerButtons();
735 });
736 });
737
738
739 // Center the active tab on a load
740 let activeTab = navWrap.find(".nav-item .nav-link.active");
741 if (activeTab.length > 0 ) {
742 let activeTabPosition = activeTab.position().left;
743 let activeTabWidth = activeTab.outerWidth();
744 let navWrapCenter = navWrap.outerWidth() / 2;
745
746 navWrap.scrollLeft(activeTabPosition - navWrapCenter + (activeTabWidth / 2));
747 updateScrollerButtons();
748 }
749
750 });
751
752 //=== Sticky Tab
753 let stickyTab = $scope.find(".sticky_tab");
754 let windowWidth = $(window).width();
755
756 if (stickyTab.length > 0) {
757 if (windowWidth > 576) {
758 let stickyTabHeight = stickyTab.height() + 100;
759 let stickyTabOffset = stickyTab.offset().top + stickyTabHeight;
760
761 $(window).on("scroll", function () {
762 let scrollTop = $(window).scrollTop();
763 if (scrollTop >= stickyTabOffset) {
764 stickyTab.addClass("tab_fixed");
765 } else {
766 stickyTab.removeClass("tab_fixed");
767 }
768 });
769 }
770 }
771 },
772
773 //======================== Pricing Table Tabs =========================== //
774 pricing_table_tabs: function ($scope) {
775
776 //============= Currency Changes
777 let pricingCurrency = $scope.find(".pricing-currency");
778 if (pricingCurrency.length > 0) {
779 pricingCurrency.on("change", function () {
780 let dollar_id = $(this).attr("data-id");
781 let dollar = $(".price[data-id=" + dollar_id + "] .dollar");
782 let euro = $(".price[data-id=" + dollar_id + "] .euro");
783
784 if (
785 $(".pricing-currency[data-id=" + dollar_id + "]").val() === "EURO"
786 ) {
787 dollar.css("display", "none");
788 euro.css("display", "inline-block");
789 } else {
790 euro.css("display", "none");
791 dollar.css("display", "inline-block");
792 }
793 });
794 }
795
796 // custom tab js
797 let pricingTab = $scope.find(".ezd-tab-menu li button");
798 pricingTab.on("click", function (e) {
799 e.preventDefault();
800
801 // Remove active class from all tabs within the same menu
802 $(this).closest(".ezd-tab-menu").find("li button").removeClass("active");
803
804 // Add active class to the clicked tab
805 $(this).addClass("active");
806
807 let target = $(this).attr("data-rel");
808
809 $("#" + target)
810 .addClass("active")
811 .siblings(".ezd-tab-box")
812 .removeClass("active");
813
814 return false;
815 });
816 },
817
818
819 };
820
821 $window.on("elementor/frontend/init", spiderElements.onInit);
822 })(jQuery, window);
823