PageSourceSearch

https://www.kimptonshinjuku.com/wp-content/themes/kimpton-hotels/custom.js?ver=09062019

js kimptonshinjuku.com collected 2026-10-02 04:49:28 UTC 4,855 bytes, 169 lines download raw bytes

1jQuery(document).ready(function($) {
2	$('.site-booking > a').on('click', function(event) {
3		event.preventDefault();
4		$('#book-reservation').slideToggle();
5	});
6	$(document).on('click', '#maximize-options', function(event) {
7		event.preventDefault();
8		if(!$('#book-reservation #more-options').hasClass('active')) {
9			$('#book-reservation #more-options').addClass('active');
10		}
11		else {
12			$('#book-reservation #more-options').removeClass('active');
13		}
14	});
15	$('.bookpopup').each(function(index, el) {
16		$(this).find('a').attr({
17			'data-src': '#book-popup',
18			'data-fancybox': 'fancybox'+index,
19		});
20	});
21	$('.site-header .menu-toggle').on('click', function(event) {
22		event.preventDefault();
23		if(!$('.site-header-wrapper').hasClass('active')) {
24			$('.site-header-wrapper').addClass('active');
25		}
26		else {
27			$('.site-header-wrapper').removeClass('active');
28		}
29		event.stopPropagation();
30	});
31	if($(window).width() < 769) {
32		$('.site-navigation ul.menu li').on('click', function(event) {
33			//event.preventDefault();
34			if($(this).children('ul').is(':hidden')) {
35				$('.site-navigation ul.menu li ul').slideUp();
36				$(this).children('ul').stop().slideDown();
37			}
38			//event.stopPropagation();
39		});
40	}
41	$('.lang-toggle .current').on('click', function(event) {
42		event.preventDefault();
43		$('.lang-toggle .widget').slideToggle();
44	});
45	$('.mobile-dropdown ul').each(function(){		
46		$("<select />").appendTo(".mobile-dropdown");
47		$(".mobile-dropdown ul li a").each(function() {
48			var el = $(this);
49			$("<option />", {
50				"value"   : el.attr("href"),
51				"text"    : el.text()
52			}).appendTo(".mobile-dropdown select");
53		});
54		$('.mobile-dropdown ul').hide();
55	});
56	$(document).on('change', '.mobile-dropdown select', function(event) {
57		event.preventDefault();
58		window.location.href = $(this).val();
59	});
60	$(document).on('change', '.menu-tab-wrapper select', function(event) {
61		event.preventDefault();
62		window.location.href = $(this).val();
63	});
64// 	$('.offer-wrapper .text').matchHeight();
65	$(window).load(function() {
66		$('.menu-tab-wrapper select').each(function(index, el) {
67			$(this).SumoSelect();
68		});
69		$('.mobile-dropdown select').each(function(index, el) {
70			$(this).SumoSelect();
71		});
72		$('.pager-index .current').text('1');
73		$('.pager-index .total').text($('.gallery-wrapper .item').length);
74		var $main = $('.gallery-wrapper').addClass('owl-carousel').owlCarousel({
75			items: 1,
76			nav: true,
77			navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
78			dots: false,
79			loop: false,
80			animateIn: 'fadeIn',
81			animateOut: 'fadeOut',
82		});
83		
84		$('.gallery-pager .slider').addClass('owl-carousel').owlCarousel({			
85			nav: true,		
86			navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],		
87			dots: false,
88			margin: 10,
89			loop: false,
90			responsive:{
91				0:{
92					items:5,
93				},
94				990: {
95					items:7,
96				},
97				1280: {
98					items:10,
99				}
100
101			},
102			afterAction: function(el){
103				this
104				.$owlItems
105				.removeClass('active')
106
107				this
108				.$owlItems
109				.eq(this.currentItem + 1)
110				.addClass('active')    
111			} 
112		});
113		$('.gallery-pager .owl-item').on('click', function(event) {
114			event.preventDefault();
115			$main.trigger('to.owl.carousel', $(this).index(), 1000);
116		});
117		$main.on('changed.owl.carousel', function (e) {
118			$('.pager-index .current').text(e.item.index - - 1);
119		});
120		$(document).on('click', '.page-id-348 .menu-photos ul li a', function(event) {
121			event.preventDefault();
122			var hash = $(this).attr('href');
123			var temp = hash.split('#');
124			var slideIndex = $('#'+temp[1]).parent().index();
125			$main.trigger('to.owl.carousel', slideIndex, 1000);
126		});
127		if(window.location.hash) {
128			console.log(window.location.hash);
129			var hash = window.location.hash;
130			if($(hash).length > 0) {
131				$('html, body').animate({ scrollTop: 0 },0 );
132				var slideIndex = $(hash).parent().index();
133				$main.trigger('to.owl.carousel', slideIndex, 1000);
134			}
135		}
136	});
137	manageCarousel();
138});
139
140function manageCarousel() {
141    var promoSelector = jQuery('#promo-carousel');
142    var windowWidth = jQuery(window).width();
143
144    if (windowWidth < 769) {
145        if (!promoSelector.hasClass('owl-loaded')) {
146            promoSelector.addClass('owl-carousel').owlCarousel({
147                loop: false,
148                margin: 15,
149                nav: false,
150                dots: true,
151                items: 1,
152                stagePadding: 30,
153                mouseDrag: true,
154                touchDrag: true
155            });
156        }
157    } else {
158        if (promoSelector.hasClass('owl-loaded')) {
159            promoSelector.trigger('destroy.owl.carousel').removeClass('owl-carousel owl-loaded');
160
161            promoSelector.find('.owl-stage-outer').children().unwrap();
162        }
163    }
164}
165
166
167jQuery(window).resize(function() {
168    manageCarousel();
169});

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.