PageSourceSearch

https://www.aerobicyfitness.com/themes/aerobicyfitness_profesional/assets/js/custom.js

js aerobicyfitness.com collected 2026-09-29 13:22:15 UTC 6,219 bytes, 172 lines download raw bytes

1$(document).ready(function(){
2    
3    if($('.PM_ASCritRange a').length > 0) {
4    	$('.PM_ASCritRange a:nth-child(2)').text('Min');
5    	$('.PM_ASCritRange a:nth-child(3)').text('Max');
6    }
7    
8    
9    $(document).on('click', '#search_widget form i', function(e) {
10    	e.preventDefault();
11        $('#search_widget form input').click();
12    });
13    
14    if ($('#checkout').length === 1) {
15      hideinvoicefields();
16    }
17	
18	if($(window).width() < 992){
19		if($('div#ecommbanners_displayHome ul.htmlcontent').length > 0) {
20			$('div#ecommbanners_displayHome ul.htmlcontent').addClass('owl-carousel').addClass('owl-theme');
21			generateowlcarousel($('div#ecommbanners_displayHome ul.htmlcontent'));
22		}
23	}
24	
25	if($(window).width() < 992){
26		if($('div#ecommbanners_ecommbanners ul.htmlcontent').length > 0) {
27			$('div#ecommbanners_ecommbanners ul.htmlcontent').addClass('owl-carousel').addClass('owl-theme');
28			generateowlcarousel($('div#ecommbanners_ecommbanners ul.htmlcontent'));
29		}
30	}
31	if($(window).width() < 992){
32		if($('.ybc_blog_content_block').length > 0) {
33			$('.ybc_blog_content_block').addClass('owl-carousel').addClass('owl-theme');
34			generateowlcarousel($('.ybc_blog_content_block'));
35		}
36	}
37	
38	
39	
40    
41    $(document).on('click', '#_mobile_cart .blockcart.cart-preview.active .header', function(e) {
42    	e.preventDefault();
43         $(this).parent().find('.body').toggleClass('open');
44         $('body').addClass('openLateralPopup');
45    });
46    $(document).on('click', '.close_mobile_cart', function(e) {
47    	e.preventDefault();
48    	 $('.blockcart.cart-preview .body').removeClass('open');
49         $('body').removeClass('openLateralPopup');
50    });
51    
52    
53	$(document).on('click', '.item_faq', function(e) {
54        if($(this).hasClass('active')) {
55        	$(this).removeClass('active');
56        	$(this).find('.answer').slideUp();
57        } else {
58        	$(this).addClass('active');
59        	$(this).find('.answer').slideDown();
60        }
61    });
62   
63    /* DESPLEGABLE lateral carrito y customer */
64    $(document).on('click', '.blockcart.cart-preview', function(e) {
65        //e.preventDefault();
66        $('#_desktop_user_info .user-popup').removeClass('open');
67        //$(this).parent().find('.lateral-popup').toggleClass('open');
68       // $('body').toggleClass('openLateralPopup');
69    });
70    $(document).on('click', '#header .lateral-popup .close-popup', function() {
71        $(this).closest('.lateral-popup').removeClass('open');
72        $('body').removeClass('openLateralPopup');
73    });
74
75    $(document).on('click', '.user-info', function(e) {
76        e.preventDefault();
77        $('#_desktop_user_info').next().toggleClass('open');
78        $('body').toggleClass('openLateralPopup');
79    });
80    /* end DESPLEGABLE lateral carrito y customer */
81
82    $(document).on('click', 'header .fakesearch', function(e) {
83        e.preventDefault();
84        $(this).next().toggleClass('open');
85        $('body').toggleClass('openSearchMobile');
86    });
87
88
89
90    $('#right-button').click(function(event) {
91        event.preventDefault();
92        widthli = $('.subcategories-list li').outerWidth(true);
93
94        $('.subcategories-list').animate({
95            scrollLeft: "+="+widthli
96
97        }, "fast");
98    });
99
100    $('#left-button').click(function(event) {
101        event.preventDefault();
102        widthli = $('.subcategories-list li').outerWidth(true);
103        $('.subcategories-list').animate({
104            scrollLeft: "-="+widthli
105        }, "fast");
106    });
107
108    $(document).on('click', '.infinitescroll-load-more-bottom a', function() {
109        var total = JSON.parse($('.paginationextrainfo').attr('total'));
110        var current = JSON.parse($('.paginationextrainfo').attr('current'))+24;
111        if (current > total)
112            current = total;
113        var cant =  (current*100)/total;
114        $('.paginationextrainfo').attr('current', current)
115        $('#showing_current-info').html(current);
116        $('.showing-bar-active').css('width', cant+'%')
117    })
118
119    /*Boton de volver arriba*/
120    $(window).scroll(function () {
121        if ($(this).scrollTop() >= 200) {        // If page is scrolled more than 50px
122            $('#return-to-top').fadeIn(200);    // Fade in the arrow
123        } else {
124            $('#return-to-top').fadeOut(200);   // Else fade out the arrow
125        }
126    });
127    $('#return-to-top').click(function () {      // When arrow is clicked
128        $('body,html').animate({
129            scrollTop: 0                       // Scroll to top of body
130        }, 500);
131    });
132});
133
134/*
135 * mostrar/ocultar div's nif-empresa / evento toggle checkbox
136 */
137function hideinvoicefields() {
138    $("input[name='ic_need_invoice']").prop("checked", true);
139    $("input[name='ic_company']").val($('#hidden-company').val());
140    $("input[name='ic_cif']").val($('#hidden-cif').val());
141    
142    if ($('div#invoice-address').length === 1 || $('div#invoice-addresses').length === 1) {
143        $('#need_invoice_check').hide();
144        $('#need_invoice_fields').hide();
145        $('#use_same_address').parents('div.form-group').hide();
146    } else if ($('div#delivery-address').length === 0) {
147        $('#need_invoice_check').show();
148        //$('#need_invoice_fields').show();
149        $('#use_same_address').parents('div.form-group').show();
150    }
151
152    //change event
153    $("input[name='ic_need_invoice']").change(function () {
154//        if ($("input[name='ic_need_invoice']").is(':visible')) {
155            if ($(this).is(':checked')) {
156                $('#need_invoice_check').show();
157                $('#need_invoice_fields').show();
158                $("input[name='ic_company']").attr('required', 'true');
159                $("input[name='ic_cif']").attr('required', 'true');
160                $('#use_same_address').parents('div.form-group').show();
161            } else {
162                //$('#need_invoice_check').hide();
163                $('#need_invoice_fields').hide();
164                $("input[name='ic_company']").val('').removeAttr('required');
165                $("input[name='ic_cif']").val('').removeAttr('required');
166                $('#use_same_address').parents('div.form-group').hide();
167            }
168//        }
169    });
170    $("input[name='ic_need_invoice']").change();
171}
172

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.