PageSourceSearch

https://www.visitfuerteventura.com/themes/custom/hic_front_theme/js/navigation/navigation.js?tlvok2

js visitfuerteventura.com collected 2026-09-24 23:20:42 UTC 6,724 bytes, 140 lines download raw bytes

1(function($) {
2
3    "use strict";
4
5    Drupal.behaviors.navigationView = {
6        attach: function() {
7            stablishTwoColumnsSubMenu();
8            heightFooterWebsites();
9
10            function stablishTwoColumnsSubMenu() {
11                var twoCol = $('.two-column-menu');
12                twoCol.each(function() {
13                    $(this).parent().addClass('two-cols-submenu');
14                });
15            }
16            // Desplegable de los item con 1 columna
17            $('.block-menu.navigation.menu--main').find('.menu-item--expanded:not(.two-cols-submenu)').on({
18                mouseenter: function() {
19                    var wLink = $(this).first().outerWidth();
20                    var leftPosition = (-1 * (190 / 2)) + (wLink / 2);
21                    $(this).find('ul.menu').first().addClass('hovered').css({ 'left': leftPosition });
22                },
23                mouseleave: function() {
24                    $(this).find('ul.menu').first().removeClass('hovered');
25                }
26            });
27            // Desplegable de los item con 2 columnas
28            $('.block-menu.navigation.menu--main').find('.menu-item--expanded.two-cols-submenu').on({
29                mouseenter: function() {
30                    var wLink = $(this).first().outerWidth();
31                    var leftPosition = (-1 * (450 / 2)) + (wLink / 2);
32                    $(this).find('ul.menu').first().addClass('hovered').css({ 'left': leftPosition });
33                },
34                mouseleave: function() {
35                    $(this).find('ul.menu').first().removeClass('hovered');
36                }
37            });
38            // Desplegable de los item con 1 columna
39            $('.menu--navigation-fuerteventura, .menu--menu-navigation-el-hierro, .menu--menu-navigation-la-gomera, .menu--menu-navigation-la-palma').find('.menu-item--expanded:not(.two-cols-submenu)').on({
40                mouseenter: function() {
41                    var wLink = $(this).first().outerWidth();
42                    var leftPosition = (-1 * (190 / 2)) + (wLink / 2);
43                    $(this).find('ul.menu').first().addClass('hovered').css({ 'left': leftPosition });
44                },
45                mouseleave: function() {
46                    $(this).find('ul.menu').first().removeClass('hovered');
47                }
48            });
49            // Desplegable de los item con 2 columnas
50            $('.menu--navigation-fuerteventura, .menu--menu-navigation-el-hierro, .menu--menu-navigation-la-gomera, .menu--menu-navigation-la-palma').find('.menu-item--expanded.two-cols-submenu').on({
51                mouseenter: function() {
52                    var wLink = $(this).first().outerWidth();
53                    var leftPosition = (-1 * (450 / 2)) + (wLink / 2);
54                    $(this).find('ul.menu').first().addClass('hovered').css({ 'left': leftPosition });
55                },
56                mouseleave: function() {
57                    $(this).find('ul.menu').first().removeClass('hovered');
58                }
59            });
60            // Desplegable del primer item "Select"
61            $('.menu--navigation-fuerteventura, .menu--menu-navigation-el-hierro, .menu--menu-navigation-la-gomera, .menu--menu-navigation-la-palma').find('.menu-item--expanded:first-child').on({
62                mouseenter: function() {
63                    if($('header.is-fixed-header')){
64                        var leftPosition = 0;
65                        $('.menu-select-island').addClass('menu-item-hover');
66                        $(this).find('ul.menu').first().addClass('hovered').css({ 'left': leftPosition });
67                    }
68                },
69                mouseleave: function() {
70                    $('.menu-select-island').removeClass('menu-item-hover');
71                }
72            });
73
74            $('#menu_mobile_opener').on({
75                click: function() {
76                    $('.layout-sidebar-first').removeClass('hidden');
77                    $('.page-content').addClass('menu-active');
78                }
79            });
80
81            $('#menu_mobile_closer').on({
82                click: function() {
83                    $('.page-content').removeClass('menu-active').addClass('menu-inactive');
84                    setTimeout(function() {
85                        $('.page-content').removeClass('menu-inactive');
86                    }, 500);
87                    setTimeout(function() {
88                        $('.layout-sidebar-first').addClass('hidden');
89                    }, 500);
90                }
91            });
92
93            $('.menu--footer-website-menu').find('.footer_menu_title').on({
94                'click mouseenter': function() {
95                    if ($(this).parent().hasClass('no-active')) {
96                        $(this).parent().removeClass('no-active').addClass('active');
97                        $('.menu--footer-website-menu').find('.footer_menu_title').not(this).parent().removeClass('active').addClass('no-active');
98                    }
99                }
100            });
101
102            function heightFooterWebsites() {
103                var menuWebsites = $('.menu--footer-website-menu');
104                var titleItems = menuWebsites.find('.footer_menu_title');
105                var heightContent = 0;
106                titleItems.each(function() {
107                    heightContent = heightContent + $(this).innerHeight();
108                });
109                if ($(window).innerWidth() > 991) {
110                    menuWebsites.find('.wrapper-item-content').css({ 'height': heightContent });
111                    var heightText = menuWebsites.find('.wrapper-item-content').find('.footer_menu_img').innerHeight();
112                    menuWebsites.find('.wrapper-item-content').find('.wrapper-text-link').css({ 'height': heightText });
113                } else {
114                    menuWebsites.find('.wrapper-item-content').removeAttr('style');
115                    menuWebsites.find('.wrapper-item-content').find('.wrapper-text-link').removeAttr('style');
116                }
117            }
118
119            var resizerTimer;
120            $(window).on('resize', function(e) {
121                clearTimeout(resizerTimer);
122                resizerTimer = setTimeout(function() {
123                    if ($(window).innerWidth() > 991) {
124                        $('.page-content').removeClass('menu-active');
125                    }
126                    heightFooterWebsites();
127
128                }, 100);
129            });
130        }
131    };
132})(jQuery);
133
134// Menu mobile islas
135jQuery(document).ready(function() {
136    jQuery('.menu-select-island-mobile').click(function() {
137      var $menu = jQuery('.menu-item--expanded:first-child .menu');
138      $menu.toggleClass("d-block");
139    });
140});

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.