PageSourceSearch

https://tours-luxor.com/wp-content/plugins/travel-booking/inc/exte…/js/travel-booking-element.js?ver=1.0.2

js tours-luxor.com collected 2026-10-04 03:17:20 UTC 5,260 bytes, 163 lines download raw bytes

1const jQuerydynamicGallery = document.getElementById("ekits-product-columns");
2const jQuerydynamicgal = document.querySelector('.dynamic-gal');
3if (jQuerydynamicgal) {
4	const data = jQuerydynamicgal.getAttribute('data-dynamicpath');
5	const objs = JSON.parse(data);
6	const modifiedData = objs.map(obj => { 
7		return {
8			src: obj.src,
9			responsive: obj.responsive,
10			thumb: obj.thumb,
11			subHtml: obj.subHtml
12		};
13	});
14	const dynamicGallery = window.lightGallery(jQuerydynamicGallery, {  
15		dynamic: true,
16		plugins: [lgThumbnail],
17		dynamicEl: modifiedData,
18		height: "80%",
19		width: "65%",
20		addClass: 'fixed-size',
21		download: false,
22		counter: true,
23		// thumbWidth: "65%",
24		// enableThumbSwipe:true,
25		
26	});
27	document.querySelectorAll(".dynamic-gal").forEach((el, index) => {
28		el.addEventListener("click", () => {
29			dynamicGallery.openGallery(0);
30		});
31	});
32}
33const accordionTitles = document.querySelectorAll(".tour-faq-toggle");
34
35accordionTitles.forEach((accordionTitle) => {
36	accordionTitle.addEventListener("click", () => {
37		if (accordionTitle.classList.contains("is-open")) {
38			accordionTitle.classList.remove("is-open");
39		} else {
40			const accordionTitlesWithIsOpen = document.querySelectorAll(".is-open");
41			accordionTitlesWithIsOpen.forEach((accordionTitleWithIsOpen) => {
42				accordionTitleWithIsOpen.classList.remove("is-open");
43			});
44			accordionTitle.classList.add("is-open");
45		}
46	});
47});
48
49var tabLinks = document.querySelectorAll(".nav-tabs-item li");
50var tabContent = document.querySelectorAll(".tab-content .tab-pane"); 
51
52tabLinks.forEach(function (el) {
53	el.addEventListener("click", openTabs);
54});
55
56
57function openTabs(el) {
58	var btn = el.currentTarget;
59	var electronic = btn.children[0].getAttribute("href");
60	tabContent.forEach(function (el) {
61		el.classList.remove("active");
62	});
63
64	tabLinks.forEach(function (el) {
65		el.classList.remove("active");
66	});
67
68	document.querySelector(electronic).classList.add("active");
69
70	btn.classList.add("active");
71}
72var travel_custom_js = {
73	travel_search_attributes: function () {
74		function query_search_atrributes_result(value_search, sortby) {  
75			var attributes = jQuery('.search-attributes').data('attr'),
76				layout = jQuery('.search-attributes').data('layout');
77			var data = {
78				action: 'search_arttibutes_item',
79				value_search: value_search,
80				sortby: sortby,
81				attributes: attributes,
82				layout: layout
83			};
84			jQuery.ajax({
85				type: "POST",
86				url: ajax.ajaxUrl,
87				data: data,
88				// dataType: "html",
89				beforeSend: function () {
90					// setting a timeout
91					jQuery('.arrt-content-wrapper').addClass('loading');
92					jQuery('.button-attributes').addClass('loading');
93				},
94				success: function (response) {
95					// console.log(response);
96					if (response.success) {
97						jQuery('.arrt-content-wrapper').removeClass('loading');
98						jQuery('.button-attributes').removeClass('loading');
99						jQuery('.thim-ekits--tour__attributes__inner').html('')
100						jQuery('.thim-ekits--tour__attributes__inner').html(response.content)
101					}
102				}
103			});
104		}
105		jQuery('.sort_attributes').on('change', function () { 
106			var value_search = jQuery('.search-attributes').find("input").val(),
107				a = jQuery(this).val();
108			
109			//updateQueryStringParam('sortby', a)
110			let new_url = "";
111			if (window.location.search && window.location.search.indexOf('sortby=') != -1) {
112				new_url = window.location.search.replace(/sortby=\w*\d*/, "sortby=" + a);
113			} else if (window.location.search) {
114				new_url = window.location.search + "&sortby=" + a;
115			} else {
116				new_url = window.location.search + "?sortby=" + a;
117			}
118			window.history.pushState({
119				path: new_url
120			}, '', new_url);
121			location.reload(true)
122		});
123
124		jQuery('.search-attributes').find("input").keyup(function (e) {
125			e.preventDefault();
126			var value_search = jQuery(this).val(),
127				sortby = jQuery('.sort_attributes').val(); 
128			// var url = document.location.href+'?s_tour='+location;
129			let new_url = "";
130			if (window.location.search && window.location.search.indexOf('s_tour=') != -1) {
131				new_url = window.location.search.replace(/s_tour=\w*\d*/, "s_tour=" + value_search);
132			} else if (window.location.search) {
133				new_url = window.location.search + "&s_tour=" + value_search;
134			} else {
135				new_url = window.location.search + "?s_tour=" + value_search;
136			}
137			// window.location.href = new_url;
138			window.history.pushState({
139				path: new_url
140			}, '', new_url);
141			if (value_search !== null && value_search !== '') {
142				query_search_atrributes_result(value_search, sortby);
143				jQuery('.pagination-archiver-attr').css('display', 'none');
144			} else {
145				location.reload(true)
146			}
147		});
148	},
149}
150
151jQuery(document).ready(function () { 
152	travel_custom_js.travel_search_attributes();
153});
154jQuery(window).on('elementor/frontend/init', () => {
155	const addHandler = ($element) => {
156		elementorFrontend.elementsHandler.addHandler(window.ThimEkits.ThimSlider, {
157			$element,
158		});
159	};
160	elementorFrontend.hooks.addAction('frontend/element_ready/thim-ekits-tours-related.default', addHandler);
161	elementorFrontend.hooks.addAction('frontend/element_ready/thim-ekits-list-tours.default', addHandler);
162	elementorFrontend.hooks.addAction('frontend/element_ready/thim-ekits-attributes.default', addHandler);
163}); 

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.