PageSourceSearch

https://sadulaauto.ee/extension/ronixa/catalog/view/javascript/custom.js

js sadulaauto.ee collected 2026-09-25 13:17:29 UTC 5,877 bytes, 197 lines download raw bytes

1/*-------------------------------------------------------------------------------------------------------
2* Template Name    : Ronixa | Responsive Bootstrap 5 Education Theme
3* Author           : Retrina Group
4* Version          : 1.0.0
5* Created          : May 2022
6* File Description : Main js file of the template
7*-------------------------------------------------------------------------------------------------------*/
8
9
10var $window = $(window);
11
12/* -------------------------    Document.Ready   ------------------------ */
13$(document).ready(function() {
14    headerSticky();
15    closeBtn();
16    headerAccordion();
17    headerMenu();
18    languageBoxHover();
19    curencyBoxHover();
20    acountBoxHover();
21    search();
22    Counter();
23    sidebarToggle();
24});
25
26/* -------------------------   Window on Load   ------------------------ */
27
28$window.on("load", (function() {
29    headerSticky();
30    
31}));
32
33/* -------------------------   Window on scroll   ------------------------ */
34$window.on('scroll', function () {
35    headerSticky();
36    Counter();
37});
38
39/* -------------------------   Function   ------------------------ */
40    // header-sticky
41    function headerSticky(){
42        "use strict";
43        var headerH = $('#ronixa-header').outerHeight();
44        if ($window.scrollTop() > 49) {
45            $('#ronixa-header').addClass('header-sticky');
46            $('body').css('padding-top', headerH);
47        } else {
48            $('#ronixa-header').removeClass('header-sticky');
49            $('body').css('padding-top', '0');
50        }
51    }
52
53    // Top Banner Close Button
54    function closeBtn(){
55        "use strict";
56        
57        $('#close').on('click', function() {
58            $(".page-top-bar").slideUp("fast");
59        });
60    }
61
62    // Header Accordion
63    function headerAccordion(){
64        "use strict";
65        
66        $(".accordion-header").click(function(){
67            $(this).toggleClass("show-filter");
68            $(this).children('i').toggleClass('rotate-angle');
69            $(this).siblings(".products-filter-content").slideToggle("slow");
70        });
71    }
72
73    // Header Menu
74    function headerMenu(){
75        "use strict";
76        
77        if ($window.width() > 767) {
78            $(".header-menu").hover(function() {
79                $(".header-menu .navbar").toggleClass("show");
80            });
81        }
82    }
83
84    // Language Box Hover
85    function languageBoxHover(){
86        "use strict";
87        
88        if ($window.width() > 767) {
89            $(".language-box").hover(function() {
90                $(".language-box .dropdown-menu").toggleClass("show");
91            });
92        }
93    }
94    
95    // Curency Box Hover
96    function curencyBoxHover(){
97        "use strict";
98        
99        if ($window.width() > 767) {
100          $(".curency-box").hover(function() {
101              $(".curency-box .dropdown-menu").toggleClass("show");
102          });
103        }
104    }
105
106    // Acount Box Hover
107    function acountBoxHover(){
108        "use strict";
109        
110        if ($window.width() > 767) {
111          $(".menu-acount-box").hover(function() {
112              $(".menu-acount-box .dropdown-menu").toggleClass("show");
113          });
114        }
115    }
116
117   // Search
118   function search(){
119       "use strict";
120       
121       if ($window.width() < 768) {
122        $(".search-btn").on('click', function() {
123          $(".header-search").toggleClass("active");
124          });
125          $(".lni-close").on('click', function() {
126              $(".header-search").removeClass("active");
127          });
128          
129          $('.header-search input[name=\'search\']').parent().find('button').on('click', function() {
130            var url = $('base').attr('href') + 'index.php?route=product/search';
131      
132            var value = $('header .header-search input[name=\'search\']').val();
133      
134            if (value) {
135              url += '&search=' + encodeURIComponent(value);
136            }
137      
138            location = url;
139        });
140   
141
142        $('#ronixa-search input[name=\'search\']').on('keydown', function(e) {
143            if (e.keyCode == 13) {
144              $('header #ronixa-search input[name=\'search\']').parent().find('button').trigger('click');
145            }
146          });
147        }
148    }
149
150    // Counter
151    function Counter(){
152        "use strict";
153        
154         var scroll = $window.scrollTop();
155         var countId = $('#count-up');
156         if (countId.length){
157             var winH = $window.height(),
158                 countOffset = countId.offset().top;
159             if (scroll + winH > countOffset) {
160                 $('.timer').countTo();
161                 $('.count-number').removeClass('timer');
162             }
163        }
164    }
165    
166    // Sidebar Toggle
167    function sidebarToggle() {
168        "use strict";
169    
170        if ($('#column-left').length || $('#column-right').length) {
171
172            if ($('#column-left').length) {
173                $("#column-left").addClass("mobile-page-aside");
174            }
175    
176            if ($('#column-right').length) {
177                $("#column-right").addClass("mobile-page-aside");
178            }
179    
180            $(".mobile-page-aside > div").addClass("mobile-page-aside-child");
181    
182            $('.mobile-page-aside').css({
183                'transition': 'none'
184            });
185    
186            $('.aside-toggler').on('click', function() {
187    
188                $('.mobile-page-aside').css({
189                    'transition': 'all 0.5s ease'
190                }).toggleClass('show');
191                $('.property-agent-sticky').toggleClass('show');
192                $(this).toggleClass('open');
193                $('html, body').toggleClass('fix-hidden');
194            });
195    
196        }
197    }

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.