PageSourceSearch

https://vaga.lt/catalog/view/theme/so-supermarket/js/so.custom.js?v=0.9.5

js vaga.lt collected 2026-10-02 07:24:51 UTC 3,899 bytes, 185 lines download raw bytes

1
2
3/* Add Custom Code Jquery
4 ========================================================*/
5$(document).ready(function(){
6	// Fix hover on IOS
7	$('body').bind('touchstart', function() {}); 
8	
9
10	// Messenger posmotion
11	$( "#close-posmotion-header" ).click(function() {
12		$('.promotion-top').toggleClass('hidden-promotion');
13		$('body').toggleClass('hidden-promotion-body');
14
15		if($(".promotion-top").hasClass("hidden-promotion")){
16			$.cookie("open", 0);
17			
18		} else{
19			$.cookie("open", 1);
20		}
21
22	});
23	
24	if($.cookie("open") == 0){
25		$('.promotion-top').addClass('hidden-promotion');
26		$('body').addClass('hidden-promotion-body');
27	}
28
29
30	// Messenger Top Link
31	$('.list-msg').owlCarousel2({
32		pagination: false,
33		center: false,
34		nav: false,
35		dots: false,
36		loop: true,
37		slideBy: 1,
38		autoplay: true,
39		margin: 30,
40		autoplayTimeout: 4500,
41		autoplayHoverPause: true,
42		autoplaySpeed: 1200,
43		startPosition: 0, 
44		responsive:{
45			0:{
46				items:1
47			},
48			480:{
49				items:1
50			},
51			768:{
52				items:1
53			},
54			1200:{
55				items:1
56			}
57		}
58	});
59
60
61
62
63
64
65	// Close pop up countdown
66	 $( "#so_popup_countdown .customer a" ).click(function() {
67	  $('body').toggleClass('hidden-popup-countdown');
68	 });
69	// =========================================
70
71
72	// click header search header 
73	jQuery(document).ready(function($){
74		$( ".search-header-w .icon-search" ).click(function() {
75		$('#sosearchpro .search').slideToggle(200);
76		$(this).toggleClass('active');
77		});
78	});
79
80	// add class Box categories
81	jQuery(document).ready(function($){
82
83		if($("#accordion-category .panel .panel-collapse").hasClass("in")){
84			$('#accordion-category .panel .accordion-toggle').addClass("show");			
85		} 
86		else{
87			$('#accordion-category .panel .accordion-toggle').removeClass("show");
88		}
89
90	});
91
92	// slider categories
93	jQuery(document).ready(function($) {
94	    var slidercate = $(".layout-2 .so-categories.custom-slidercates .cat-wrap");
95	    slidercate.owlCarousel2({    
96	    margin:30,
97	    nav:true,
98	    loop:false,
99	    dots: false,
100	    navText: ['',''],
101	    responsive:{
102	            0:{
103	                items:1
104	            },
105	            480:{
106	                items:2
107	            },
108	            768:{
109	                items:3
110	            },
111	            992:{
112	                items:4
113	            },
114	            1200:{
115	                items:5
116	            },
117	        },
118	    })
119	});
120
121	jQuery(document).ready(function($) {
122	    var slidercate = $(".layout-3 .so-categories.custom-slidercates .cat-wrap");
123	    slidercate.owlCarousel2({    
124	    margin:30,
125	    nav:true,
126	    loop:true,
127	    dots: false,
128	    navText: ['',''],
129	    responsive:{
130	            0:{
131	                items:1
132	            },
133	            480:{
134	                items:2
135	            },
136	            768:{
137	                items:3
138	            },
139	            992:{
140	                items:4
141	            },
142	            1200:{
143	                items:4
144	            },
145	        },
146	    })
147	});
148
149
150	// custom to show footer center
151	$(".description-toggle").click(function () {
152		if($('.showmore').hasClass('active'))
153			$('.showmore').removeClass('active');
154		else
155			$('.showmore').addClass('active');
156	}); 
157
158
159	$(".content-product-content .button-toggle").click(function () {
160		if($(this).children('.showmore').hasClass('active')) $(this).children().removeClass('active');
161		else $(this).children().addClass('active');
162		
163		
164		
165		if($(this).prev().hasClass('showdown')) $(this).prev().removeClass('showdown').addClass('showup');
166		else $(this).prev().removeClass('showup').addClass('showdown');
167	}); 
168
169	$(".clearable").each(function() {
170  
171	  var $inp = $(this).find("input:text"),
172	      $cle = $(this).find(".clearable__clear");
173
174	  $inp.on("input", function(){
175	    $cle.toggle(!!this.value);
176	  });
177	  
178	  $cle.on("touchstart click", function(e) {
179	    e.preventDefault();
180	    $inp.val("").trigger("input");
181	  });
182	  
183	});
184
185});

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.