1(function ($) { 2 "use strict"; 3 4 $(window).on('resize load', function () { 5 HeightResizeWls(); 6 }); 7 8 jQuery(document).ready(function($) { 9 rt_content_ready_scripts(); 10 }); 11 12 function rt_content_ready_scripts() { 13 HeightResizeWls(); 14 $('.wls-tooltip').hover( 15 function () { 16 var $this = $(this); 17 var $parent = $(this).parents('.rt-wpls'); 18 var id = $parent.attr('id').replace("rt-container-", ""); 19 var $title = $this.attr('data-title'); 20 $tooltip = '<div class="rt-tooltip" id="rt-tooltip-' + id + '">' + 21 '<div class="rt-tooltip-content">' + $title + '</div>' + 22 '<div class="rt-tooltip-bottom"></div>' + 23 '</div>'; 24 $('body').append($tooltip); 25 var $tooltip = $('body > .rt-tooltip'); 26 var tHeight = $tooltip.outerHeight(); 27 var tBottomHeight = $tooltip.find('.rt-tooltip-bottom').outerHeight(); 28 var tWidth = $tooltip.outerWidth(); 29 var tHolderWidth = $this.outerWidth(); 30 var top = $this.offset().top - (tHeight + tBottomHeight); 31 var left = $this.offset().left; 32 $tooltip.css('top', top + 'px'); 33 $tooltip.css('left', left + 'px'); 34 $tooltip.css('opacity', 1); 35 $tooltip.show(); 36 if (tWidth <= tHolderWidth) { 37 var itemLeft = (tHolderWidth - tWidth) / 2; 38 left = left + itemLeft; 39 $tooltip.css('left', left + 'px'); 40 } else { 41 var itemLeft = (tWidth - tHolderWidth) / 2; 42 left = left - itemLeft; 43 if (left < 0) { 44 left = 0; 45 } 46 $tooltip.css('left', left + 'px'); 47 } 48 }, function () { 49 $('body > .rt-tooltip').remove(); 50 } 51 ); 52 53 $('.rt-wpls').each(function () { 54 var container = $(this), 55 $carousel = $('.rt-row.wpls-carousel', container), 56 $isotope = $('.wpls-isotope', container); 57 if ($carousel.length) { 58 var data = $carousel.data('slick'), 59 slidesToShowTab = data.slidesToShowTab, 60 slidesToShowMobile = data.slidesToShowMobile; 61 $carousel.imagesLoaded(function () { 62 HeightResizeWls(); 63 64 $carousel.on("init", function () { 65 setTimeout(function () { 66 container.removeClass('rt-loading').addClass('rt-loaded'); 67 $carousel.slick("slickGoTo", 1, true); 68 }, 0); 69 }); 70 71 $carousel.slick({ 72 responsive: [ 73 { 74 breakpoint: 992, 75 settings: { 76 slidesToShow: slidesToShowTab, 77 slidesToScroll: slidesToShowTab 78 } 79 }, 80 { 81 breakpoint: 767, 82 settings: { 83 slidesToShow: slidesToShowMobile, 84 slidesToScroll: slidesToShowMobile 85 } 86 } 87 ] 88 }); 89 }); 90 } 91 if ($isotope.length) { 92 var isotope = $isotope.imagesLoaded(function () { 93 HeightResizeWls(); 94 isotope.isotope({ 95 itemSelector: '.isotope-item', 96 }).isotope('layout'); 97 }); 98 var $isotopeButtonGroup = $isotope.parents('.rt-wpls').find('.wls-isotope-button'); 99 $isotopeButtonGroup.on('click', 'button', function (e) { 100 e.preventDefault(); 101 var filterValue = $(this).attr('data-filter'); 102 isotope.isotope({filter: filterValue}); 103 $(this).parent().find('.selected').removeClass('selected'); 104 $(this).addClass('selected'); 105 }); 106 } 107 }); 108 } 109 110 function HeightResizeWls() { 111 var wWidth = $(window).width(); 112 $(".rt-wpls").each(function () { 113 var _this = $(this), 114 dCol = _this.data('desktop-col'), 115 tCol = _this.data('tab-col'), 116 mCol = _this.data('mobile-col'), 117 rtMaxH = 0; 118 if ((wWidth >= 992 && dCol > 1) || (wWidth >= 768 && tCol > 1) || (wWidth < 768 && mCol > 1)) { 119 _this.imagesLoaded(function () { 120 _this.children('div.rt-row').find(".rt-equal-height").height("auto"); 121 _this.children('div.rt-row').find('.rt-equal-height').each(function () { 122 var $thisH = $(this).actual('outerHeight'); 123 if ($thisH > rtMaxH) { 124 rtMaxH = $thisH; 125 } 126 }); 127 _this.children('div.rt-row').find(".rt-equal-height").css('height', rtMaxH + "px"); 128 }); 129 } else { 130 _this.children('div.rt-row').find(".rt-equal-height").height("auto"); 131 } 132 }); 133 } 134 135 // Elementor Frontend Load 136 $(window).on('elementor/frontend/init', function () { 137 if (elementorFrontend.isEditMode()) { 138 elementorFrontend.hooks.addAction('frontend/element_ready/widget', function () { 139 rt_content_ready_scripts(); 140 }); 141 } 142 });
143 144})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.