PageSourceSearch

https://abadgrupoinmobiliario.es/wp-content/themes/portavoz/js/main.js?ver=6abd743458d08

js abadgrupoinmobiliario.es collected 2026-09-30 20:44:16 UTC 5,145 bytes, 135 lines download raw bytes

1jQuery(function($) {
2    var ajax = false;
3    $('.hamburger').on('click', function() {
4        $(this).toggleClass('active');
5        $('.main-menu').toggleClass('active');
6    });
7    $('.cookies-link').click(function() {
8        $('#cmplz-manage-consent button').click();
9    });
10    $('#primary, .elementor-location-single, .elementor-location-archive').css('padding-top', $('.elementor-location-header').outerHeight());
11    $('form button[type="submit"]').on('click', function(e) {
12        var t = $(this),
13            f = t.closest('form'),
14            g = 0,
15            m = [main.messages.errors];
16        f.children('.response').remove();
17        t.find('.invalid').removeClass('invalid');
18        f.find('.elementor-field-required').each(function() {
19            var c = $(this);
20            c.find('input').each(function() {
21                var x = $(this)
22                switch (x.attr('type')) {
23                    case 'text':
24                        if (x.val() == '') {
25                            g++;
26                            m.push(main.messages.fill);
27                            c.addClass('invalid');
28                        }
29                        break;
30                    case 'radio':
31                        if (c.find('input:checked').length == 0) {
32                            g++;
33                            m.push(main.messages.fill);
34                            c.addClass('invalid');
35                        }
36                        break;
37                    case 'checkbox':
38                        if (c.find('input:checked').length == 0) {
39                            g++;
40                            if (c.hasClass('elementor-field-type-acceptance')) {
41                                m.push(main.messages.legal);
42                            } else {
43                                m.push(main.messages.fill);
44                            }
45                            c.addClass('invalid');
46                        }
47                        break;
48                    case 'email':
49                        if (x.val() == '') {
50                            g++;
51                            m.push(main.messages.fill);
52                            c.addClass('invalid');
53                        } else if (check_email(x.val()) == false) {
54                            g++;
55                            m.push(main.messages.email);
56                            c.addClass('invalid');
57                        }
58                        break;
59                    case 'date':
60                        if (x.val() == '') {
61                            g++;
62                            m.push(main.messages.fill);
63                            c.addClass('invalid');
64                        }
65                        break;
66                }
67            });
68            c.find('select').each(function() {
69                var x = $(this);
70                if (x.val() == null) {
71                    g++;
72                    m.push(main.messages.fill);
73                    c.addClass('invalid');
74                }
75            });
76            c.find('textarea').each(function() {
77                var x = $(this);
78                if (x.val() == '') {
79                    g++;
80                    m.push(main.messages.fill);
81                    c.addClass('invalid');
82                }
83            });
84        });
85        if (g > 0) {
86            e.preventDefault();
87            var n = [];
88            $.each(m, function(i, el) {
89                if ($.inArray(el, n) === -1) n.push(el);
90            });
91            if (f.find('.elementor-message').length > 0) {
92                f.find('.elementor-message').html(n.join(' '));
93            } else {
94                $('<div class="elementor-message">' + n.join(' ') + '</div>').appendTo(f);
95            }
96        }
97    });
98    $('input, select, label, textarea').on('click focus', function() {
99        $(this).closest('.elementor-field-required').removeClass('invalid');
100    });
101    $('.instagram-wrapper.swiper').each(function() {
102        var t = $(this);
103        new Swiper(t[0], t.data('options'));
104    });
105    $('.buy-wrapper.swiper').each(function() {
106        var t = $(this);
107        new Swiper(t[0], t.data('options'));
108    });
109    $('.reviews-wrapper.swiper').each(function() {
110        var t = $(this);
111        new Swiper(t[0], t.data('options'));
112    });
113    $('.reviews-wrapper-movil.swiper').each(function() {
114        var t = $(this);
115        new Swiper(t[0], t.data('options'));
116    });
117    /*Para la cabecera principal en ciertas paginas*/
118    var pageIds = ['797', '1288', '1577', '6491', '3', '6524', '6773'];
119    var bodyClass = $('body').attr('class');
120    pageIds.forEach(function(pageId) {
121        if ($('body').hasClass('page-id-' + pageId)) {
122            $('.header').css('background-color', '#263380');
123        }
124    });
125    if ($('body').hasClass('elementor-page-1577')) {
126        $('.header').css('background-color', '#263380');
127    }
128});
129jQuery(window).on('scroll load', function() {
130    if (jQuery(document).scrollTop() > 200) {
131        jQuery('body').addClass('scrolled');
132    } else {
133        jQuery('body').removeClass('scrolled');
134    }
135});

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.