PageSourceSearch

https://rent.jennete.com/lib/js/front/main.js

js jennete.com collected 2026-09-30 14:18:44 UTC 7,870 bytes, 316 lines download raw bytes

1$(document).ready(function(){
2	$(window).scroll(function () {
3		if ($(window).scrollTop() > (50)) {
4			$('.navbar').addClass('on-scroll');
5		} else {
6			$('.navbar').removeClass('on-scroll');
7		}
8	});
9	$(".contentload-product").slice(0, 6).show();
10	$("#loadMore").on('click', function (e) {
11		e.preventDefault();
12		$(".contentload-product:hidden").slice(0, 6).slideDown('slow');
13		// if ($(".contentload-product:hidden").length == 0) {
14		//     $("#loadMore").fadeOut('slow');
15		// }
16		$('html,body').animate({
17			scrollTop: $(this).offset().top
18		}, 1500);
19	});
20	$('body').click(function() {
21		$('#sliding-menu').fadeOut('slow');
22	});
23
24	$('.slider-news').slick({
25		// lazyLoad: 'ondemand',
26		slidesToShow: 4,
27		slidesToScroll: 1,
28		dots: false,
29		infinite: true,
30		cssEase: 'linear',
31		autoplay: true,
32		prevArrow: '<i class="fa fa-chevron-left arrow-left" aria-hidden="true"></i>',
33		nextArrow: '<i class="fa fa-chevron-right arrow-right" aria-hidden="true"></i>',
34		responsive: [
35			{
36				breakpoint: 767,
37				settings: {
38					slidesToShow: 1,
39					slidesToScroll: 1
40				}
41			},
42			{
43				breakpoint: 1000,
44				settings: {
45					slidesToShow: 3,
46					slidesToScroll: 1
47				}
48			}
49		]
50	});
51
52
53	$('.slider-news-list').slick({
54		lazyLoad: 'ondemand',
55		slidesToShow: 1,
56		slidesToScroll: 1,
57		dots: false,
58		infinite: true,
59		cssEase: 'linear',
60		prevArrow: '<i class="fa fa-chevron-left arrow-left" aria-hidden="true"></i>',
61		nextArrow: '<i class="fa fa-chevron-right arrow-right" aria-hidden="true"></i>'
62	});
63	$('#slider-car-brand').slick({
64		lazyLoad: 'ondemand',
65		slidesToShow: 4,
66		slidesToScroll: 4,
67		rows:2,
68		dots: true,
69		infinite: true,
70		cssEase: 'linear',
71		autoplay:true,
72		arrows:false,
73		responsive: [
74			{
75				breakpoint: 767,
76				settings: {
77					slidesToShow: 2,
78					slidesToScroll: 2,
79					rows:1
80				}
81			},
82			{
83				breakpoint: 1000,
84				settings: {
85					slidesToShow: 3,
86					slidesToScroll: 1,
87					rows:1
88				}
89			}
90		]
91	});
92	$('#slider-bike-brand').slick({
93		lazyLoad: 'ondemand',
94		slidesToShow: 2,
95		slidesToScroll: 2,
96		rows:2,
97		dots: true,
98		infinite: true,
99		cssEase: 'linear',
100		autoplay:true,
101		arrows:false,
102		loop:true,
103		responsive: [
104			{
105				breakpoint: 767,
106				settings: {
107					slidesToShow: 2,
108					slidesToScroll: 2,
109					rows:1
110				}
111			},
112			{
113				breakpoint: 1000,
114				settings: {
115					slidesToShow: 2,
116					slidesToScroll: 2,
117					rows:1
118				}
119			}
120		]
121	});
122	$('.title-hover').mouseover(function(event) {
123		$(this).addClass('active');
124		$('.title-banner').addClass('gohide');
125		$('.img-banner').addClass('active');
126		$('.img-bg-banner').find('.' + $(this).attr('data-hover')).addClass('active');
127		$('.caption-hover.'+ $(this).attr('data-hover')).addClass('active');
128		$('.btn-hover.'+ $(this).attr('data-hover')).addClass('active');
129		if($( ".title-hover" ).not( document.getElementsByClassName( $(this).attr('data-hover') ) ))
130		{
131			$( ".title-hover" ).addClass('half');
132		}
133		event.preventDefault();
134
135	});
136
137	$('.title-hover').mouseleave(function(event) {
138		$(this).removeClass('active');
139		$( ".title-hover" ).removeClass('half');
140		$('.title-banner').removeClass('gohide');
141		$('.img-banner').removeClass('active');
142		$('.img-bg-banner').find('.' + $(this).attr('data-hover')).removeClass('active');
143		$('.caption-hover.'+ $(this).attr('data-hover')).removeClass('active');
144		$('.btn-hover.'+ $(this).attr('data-hover')).removeClass('active');
145		event.preventDefault();
146
147	});
148
149	var mainImage = $("#mainImage");
150	$(".img-thumb").hover(function(){
151		$(".img-thumb").removeClass('active');
152		var src = $(this).attr("src");
153		$("#mainImage").fadeIn('slow');
154		$("#mainImage").attr("src",src);
155		$(this).addClass('active');
156	});
157
158	$('.slider-for').slick({
159		slidesToShow: 1,
160		slidesToScroll: 1,
161		arrows: false,
162		fade: true,
163		asNavFor: '.slider-nav',
164		autoplay: true
165	});
166	$('.slider-nav').slick({
167		slidesToShow: 3,
168		slidesToScroll: 1,
169		asNavFor: '.slider-for',
170		dots: false,
171		centerMode: true,
172		focusOnSelect: true,
173		responsive: [
174			{
175				breakpoint: 767,
176				settings: {
177					slidesToShow: 3,
178				}
179			}
180		]
181	});
182
183	var dateStr = $("input.datepicker-start").val();
184	$("input.datepicker-start").datepicker({
185		defaultDate: new Date(),
186		minDate: new Date(),
187		dateFormat: 'dd M yy',
188		firstDay: 1,
189		changeYear: true,
190		changeMonth: true,
191		showButtonPanel: true,
192		onSelect: function(dateStr) {
193			var date = new Date(dateStr);
194			var new_date = date.setMonth(date.getMonth() + 1);
195			$('.start_date').val(dateStr);
196			$("input.datepicker-end").datepicker("option", {
197				minDate: new Date(dateStr),
198				maxDate: new Date(new_date)
199			});
200		}
201	});
202
203	var dateStr = $("input.datepicker-start").val();
204	var dateEnd = $("input.datepicker-end").val();
205	$('input.datepicker-end').datepicker({
206		dateFormat: 'dd M yy',
207		firstDay: 1,
208		changeYear: true,
209		changeMonth: true,
210		showButtonPanel: true,
211		// maxDate: new Date(dateStr),
212		onSelect: function(dateEnd) {
213			var date = new Date(dateEnd);
214			$('.end_date').val(dateEnd);
215		}
216	});
217
218	$("#credit").hide();
219	$('#bank-trf').click(function() {
220		$('#bank-transfer').show('slow');
221		$('#credit').hide('slow');
222		$("#credit .radio-detail").prop('disabled',true);
223		$("#bank-transfer .radio-detail").removeAttr('disabled');
224	});
225
226	$('#cc').click(function() {
227		$('#credit').show('slow');
228		$('#bank-transfer').hide('slow');
229		$("#bank-transfer .radio-detail").prop('disabled',true);
230		$("#credit .radio-detail").removeAttr('disabled');
231	});
232
233	$('#overlay').click(function(event) {
234		document.getElementById("mySidenav").style.height = "0";
235		$("body").css({'overflow-y':'auto'});
236		document.getElementById("overlay").style.display = "none";
237	});
238
239	$('.name').keypress(function (event) {
240		var inputValue = event.charCode;
241		if(!((inputValue > 64 && inputValue < 91) || (inputValue > 96 && inputValue < 123)||(inputValue==32)|| (inputValue==0 || (inputValue==13))))
242		{
243			event.preventDefault();
244		}
245	});
246
247	$('.address-val').keypress(function (event) {
248		var inputValue = event.charCode;
249		if(!((inputValue > 64 && inputValue < 91) || (inputValue > 96 && inputValue < 123)||(inputValue==64)||(inputValue==32)|| (inputValue==0 || (inputValue==13))||(inputValue==46)||(inputValue==95)||(inputValue==45)||(inputValue > 47 && inputValue < 58))){
250			event.preventDefault();
251		}
252	});
253
254	$('.email').keypress(function (event) {
255		var inputValue = event.charCode;
256		if(!((inputValue > 64 && inputValue < 91) || (inputValue > 96 && inputValue < 123)||(inputValue==64)||(inputValue==46)||(inputValue==95)||(inputValue==45)||(inputValue > 47 && inputValue < 58)|| (inputValue==0 || (inputValue==13))))
257		{
258			event.preventDefault();
259		}
260	});
261
262	$('.numb').keyup(function () {
263		this.value = this.value.replace(/[^0-9.]/g,'');
264	});
265
266	$( ".timepicker" ).timepicker({
267		timeFormat: 'HH:mm'
268	});
269
270});
271
272function int(amount){
273	var i = parseInt(amount);
274	if (isNaN(i)) i = 0;
275	return i;
276}
277
278function openNav() {
279	document.getElementById("mySidenav").style.height = "430px";
280	$("body").css({'overflow-y':'hidden'});
281	document.getElementById("overlay").style.display = "block";
282}
283
284/* Set the width of the side navigation to 0 */
285function closeNav() {
286	document.getElementById("mySidenav").style.height = "0";
287	$("body").css({'overflow-y':'auto'});
288	document.getElementById("overlay").style.display = "none";
289}
290
291function openPrice() {
292	document.getElementById("summary").style.height = "255px";
293}
294
295/* Set the width of the side navigation to 0 */
296function closePrice() {
297	document.getElementById("summary").style.height = "0";
298}
299
300function addCommas(nStr) {
301	nStr += '';
302	var x = nStr.split('.');
303	var x1 = x[0];
304	var x2 = x.length > 1 ? '.' + x[1] : '';
305	var rgx = /(\d+)(\d{3})/;
306	while (rgx.test(x1)) {
307		x1 = x1.replace(rgx, '$1' + ',' + '$2');
308	}
309	return x1 + x2;
310}
311
312function addDays(date, days) {
313	var result = new Date(date);
314	result.setDate(result.getDate() + days);
315	return result;
316}

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.