PageSourceSearch

https://www.worldofdiscoveries.com/wp-content/themes/hello-theme-child/assets/js/menu.js?ver=all

js worldofdiscoveries.com collected 2026-10-02 09:54:17 UTC 3,315 bytes, 119 lines download raw bytes

1/*
2jQuery(document).ready(function($) {
3	$('.bilheteria-ven').click(function(){
4		$('button.btn-header').click()
5		
6	})
7});
8*/
9
10jQuery(document).ready(function($) {
11    $(document).on('elementor/popup/show', function() {
12        $('.bilheteria-ven').off('click').on('click', function(){
13            $(' .site-header .content-menu button.btn-header').click();
14        });
15    });
16});
17
18jQuery(document).ready(function($) {
19    const languageMenu = $('.wpml-ls-statics-shortcode_actions ul');
20    languageMenu.hide();
21    
22    const currentLanguage = $('.wpml-ls-current-language span.wpml-ls-native').first().text().trim();
23    const languageSelector = $('<div>').addClass('language-selector').text(currentLanguage);
24
25    $('.wpml-ls-statics-shortcode_actions').prepend(languageSelector);
26
27    $('.language-selector').click(function(){
28        languageMenu.slideToggle()
29        $('.language-selector').toggleClass('rotate');
30    });
31	
32	var languageItems = $('.wpml-ls-item');
33	languageItems.each(function() {
34		var language = $(this).find('.wpml-ls-native').text();
35		if (language === currentLanguage) {
36			$(this).hide(); // Oculta o idioma da página atual
37		}
38
39		$(this).click(function() {
40			var newLanguage = $(this).find('.wpml-ls-native').text();
41			languageSelector.text(newLanguage);
42			languageMenu.css('display', 'none');
43		});
44	});
45
46});
47
48
49jQuery(document).ready(function ($) {
50
51    window.onorientationchange = function() { 
52        var orientation = window.orientation; 
53            switch(orientation) { 
54                case 0:
55                case 90:
56                case -90: window.location.reload(); 
57                break; } 
58    };
59    
60
61  $('.menu-hamburguer').click(function () {
62    $(this).toggleClass('active');
63    $('.main-menu').toggleClass('active');
64    $('body').toggleClass('active');
65  });
66
67  var menu = menuActive();
68  var currentMenuItems = $('.current-menu-item');
69
70  currentMenuItems.each(menu.activate);
71
72  $('.menu-item').on('mouseenter', menu.activate);
73  $('.menu-item').on('mouseleave', menu.deactivate);
74
75  $('.menu-item').mouseenter(function() {
76    if (!$(this).closest('.sub-menu').length) {
77      // Ignora si está dentro de .sub-menu
78      $(this).addClass('active-hover');
79      $('header#site-header').addClass('active');
80      $('.current-menu-item').addClass('desactive-current');
81    }
82  });
83
84  $('.menu-item').mouseleave(function() {
85    if (!$(this).closest('.sub-menu').length) {
86      // Ignora si está dentro de .sub-menu
87      $('header#site-header').removeClass('active');
88      $('.menu-item').removeClass('active-hover-after');
89      $(this).removeClass('active-hover');
90      $('.current-menu-item').removeClass('desactive-current');
91      currentMenuItems.each(menu.activate);
92    }
93  });
94});
95
96function menuActive() {
97  var activeClass;
98
99  function activateMenu() {
100    activeClass = jQuery(this).attr('class');
101    jQuery(this)
102      .addClass('active-hover-after')
103      .prevAll('.menu-item')
104      .addClass('active-hover-after')
105      .end()
106      .nextAll('.menu-item')
107      .removeClass('active-hover-after');
108  }
109
110  function deactivateMenu() {
111    jQuery(this).removeClass('active-hover-after');
112    jQuery(`.${activeClass}`).addClass('active-hover-after');
113  }
114
115  return {
116    activate: activateMenu,
117    deactivate: deactivateMenu
118  };
119}

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.