PageSourceSearch

https://condor-medtec.de/wp-content/plugins/everest-tab/assets/js/frontend/et-frontend-script.js?ver=1.1.9

js condor-medtec.de collected 2026-10-08 23:01:41 UTC 10,212 bytes, 232 lines download raw bytes

1/*
2 * Frontend JS Script Version 1.1.2
3 */
4(function ($) {
5    $(function () {
6
7       var maps = [];
8       var markers = [];
9       var woocommerce_enabled = [];
10
11       $('.etab-group-wrap').each(function() {
12        $(this).children('.etab-label').wrapAll("<div class='etab-header-wrap clearfix'><ul class='etab-title-tabs'></ul></div>");
13       });
14       if(woocommerce_enabled == "true"){
15         $('.everest-tab-main-wrapper').each(function(){
16          $(this).addClass('woocommerce');
17         });
18       }
19
20    $( window ).resize(function() {
21       if($(window).width() >= 570){
22          $('.everest-tab-main-wrapper').each(function(){
23            if($(this).hasClass('etab-top-compact-position') || $(this).hasClass('etab-bottom-compact-position')){
24              var num = $(this).find('.etab-header-wrap .etab-title-tabs li').length;
25              var eachwidth = 100 / parseInt(num);
26              $(this).find('.etab-header-wrap .etab-label').css({
27                width: eachwidth + '%'
28              });
29            }
30
31          });
32       }
33
34      $('.everest-tab-main-wrapper').each(function(){
35        var trigger_type = $(this).attr('data-tab_trigger_type');
36         $(this).find('.etab-label .etab-content-section').hide();
37           if($(window).width() <= 767){
38              var accordion_check = $(this).attr('data-accordion');
39              if(trigger_type == "on_hover"){
40               $(this).removeClass('etab-trigger-on_hover').addClass('etab-trigger-on_click');
41              }
42              if(accordion_check){
43                $(this).find('.etab-content-wrap').hide();
44                $(this).find('.etab-label.etab-active-show .etab-content-section.etab-active-content').show();
45              }else{
46               $(this).find('.etab-content-wrap').show();
47               $(this).find('.etab-label .etab-content-section').hide();
48              }
49
50          }else{
51               if(trigger_type == "on_hover"){
52                $(this).removeClass('etab-trigger-on_click').addClass('etab-trigger-on_hover');
53               }
54               $(this).find('.etab-content-wrap').show();
55               $(this).find('.etab-label .etab-content-section').hide();
56          }
57       });
58  }).resize();
59
60      $('.etab-label').each(function() {
61        if( $(this).hasClass('etab-active-show')){
62        var unique_id = $(this).parent().attr('data-id');
63         var id= $(this).attr('id');
64        $(this).closest('.etab-sc-main-wrapper').find('.'+unique_id+'.'+id).addClass("etab-active-content");
65        }
66       });
67
68
69      /*
70       * Tab Click Event
71      */
72     $(".etab-trigger-on_click").on('click', '.etab-title-tabs > .etab-label.etab-prelink', function(e){
73      e.preventDefault();
74       var deeplinkingcheck = $(this).parent('.etab-title-tabs').attr('data-deeplinking');
75        var accordioncheck = $(this).parent('.etab-title-tabs').attr('data-accordion');
76        if(deeplinkingcheck){
77            var hashvalue = $(this).find('a').attr('href');
78            var tabtype = $(this).find('a').attr('data-tabtype');
79            if(tabtype == "component_type"){
80             var tab_id = $(this).attr('id');
81             var tab_parent_id = $(this).parent().data('id');
82             var animation = $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).data('animation');
83           /*  if($(this).parent().data('deeplinking')){
84                 var hash = '#' + $(this).data('link');
85                 $(this).find('a').attr('href',hash);
86                 window.location.hash = hashvalue;
87             }*/
88         if(accordioncheck && $(window).width() < 768){
89            if(window.location.hash != hashvalue){
90             if($(this).hasClass('etab-active-show')){
91               $(this).siblings().removeClass("etab-active-show");
92               $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section').removeClass('etab-active-content');
93               $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
94            }else{
95              $(this).siblings().removeClass("etab-active-show");
96              $(this).addClass("etab-active-show");
97              $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
98              $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).addClass("etab-active-content").addClass(animation);
99            }
100           }
101         }else{
102             $(this).siblings().removeClass("etab-active-show");
103             $(this).addClass("etab-active-show");
104             $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
105             $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).addClass("etab-active-content").addClass(animation);
106            }
107          if($('.'+tab_id).find('.etab-google-map').length > 0){
108               setTimeout(function () {
109                initMap();
110               }, 1500);
111            }
112         }
113         window.location.hash = hashvalue;
114       }else{
115            var tabtype = $(this).find('a').attr('data-tabtype');
116            if(tabtype == "component_type"){
117            var tab_id = $(this).attr('id');
118            var tab_parent_id = $(this).parent().data('id');
119            var animation = $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).data('animation');
120            if(accordioncheck && $(window).width() < 768){
121             if(!$(this).hasClass('etab-active-show')){
122                $('.etab-label').removeClass("etab-active-show");
123                $(this).addClass("etab-active-show");
124                $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
125                $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).addClass("etab-active-content").addClass(animation);
126             }else{
127              $('.etab-label').removeClass("etab-active-show");
128              $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
129             }
130           }else{
131            if(!$(this).hasClass('etab-active-show')){
132                $('.etab-label').removeClass("etab-active-show");
133                $(this).addClass("etab-active-show");
134                $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
135                $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).addClass("etab-active-content").addClass(animation);
136
137             }else{
138             }
139
140           }
141
142            if($('.'+tab_id).find('.etab-google-map').length > 0){
143               setTimeout(function () {
144                initMap();
145               }, 1500);
146              }
147             }
148           /* }
149            else{
150            var tab_parent_id = $(this).parent().data('id');
151              $(this).removeClass("etab-active-show");
152              $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
153            } */
154        }
155     }).on('click', 'div.etab-content-section', function(e) {
156      // clicked on descendant div
157      //e.stopPropagation();
158    });
159
160      $('.etab-label.etab-prelink').each(function(){
161        //var hash = '#' + $(this).find('a').attr('href');
162        var hash = $(this).find('a').attr('href');
163        if(hash == window.location.hash){
164             $(this).click();
165             var top = ($('a[href='+hash+']').offset() || { "top": NaN }).top;
166              $('html, body').animate({
167                scrollTop: (top)
168              }, 2000);
169        }
170      });
171
172      $(window).on('hashchange', function(){
173          /*var hash =  $('.etab-label.etab-prelink').find('a[href="'+location.hash+'"]');
174          var locationhash = location.hash;
175          $(hash).click();*/
176        var hash = $.trim(window.location.hash);
177        var $link =  $('.etab-label.etab-prelink').find('a[href="'+hash+'"]');
178        if (!$link.parent().hasClass('.etab-active-show')) {
179          $link.trigger('click'); // Pass the flow to onclick handler
180        }
181       });
182
183       /*
184       * On Hover Tab
185       */
186      $('.etab-trigger-on_hover').on('mouseenter mouseleave','.etab-label.etab-prelink',function(e) {
187        e.preventDefault();
188           if(!$(this).hasClass('etab-active-show')){
189            var tabtype = $(this).find('a').attr('data-tabtype');
190            if(tabtype == "component_type"){
191            var tab_id = $(this).attr('id');
192            var tab_parent_id = $(this).parent().data('id');
193            var animation = $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).data('animation');
194            $(this).siblings().removeClass('etab-active-show');
195            $(this).addClass("etab-active-show");
196            $(this).closest('.etab-sc-main-wrapper').find('.etab-content-section.'+tab_parent_id).removeClass('etab-active-content');
197            $(this).closest('.etab-sc-main-wrapper').find('.'+tab_id).addClass("etab-active-content").addClass(animation);;
198            if($('.'+tab_id).find('.etab-google-map').length > 0){
199               setTimeout(function () {
200                initMap();
201               }, 1500);
202            }
203            }
204           }
205        });
206
207
208        function initMap(var_lati,var_long) {
209            var $maps = $('.etab-google-map');
210            $.each($maps, function (i, value) {
211                var zoom_level = parseInt($(value).data('zoomlevel'));
212                var varlocation = { lat: parseFloat($(value).data('latitude')), lng: parseFloat($(value).data('longitude')) };
213
214                var mapDivId = $(value).attr('id');
215
216                maps[mapDivId] = new google.maps.Map(document.getElementById(mapDivId), {
217                    zoom: zoom_level,
218                    center: varlocation
219                });
220
221                markers[mapDivId] = new google.maps.Marker({
222                    position: varlocation,
223                    map: maps[mapDivId]
224                });
225            });
226        }
227        initMap();
228    }); /** Function ends */
229
230}(jQuery));
231
232

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.