• 价格
  • 天数 < el: '.swiper-pagination', clickable: true, }, }); var mySwiper = new Swiper('.banner-swiper', { speed: 800, spaceBetween: 0, slidesPerView: 1, loop: true, autoplay: { delay: 4000, disableOnInteraction: false, }, navigation: { nextEl: ".swiper-banner-next", prevEl: ".swiper-banner-prev", }, observer: true, observeParents: true, watchOverflow: true }); $(document).ready(function() { $(".search-nav-item").click(function() { $(".search-nav-item").removeClass("active"); $(this).addClass("active"); var index = $(this).index(); // // 隐藏所有内容 // $(".tab-content .content").removeClass("active").hide(); // // 显示对应索引的内容 // $(".tab-content .content").eq(index).addClass("active").show(); }); $('.ez-checkbox input[type="checkbox"]').change(function() { $(this).siblings('.ez-checkbox-input').toggleClass('checked', this.checked); }); // 航空公司偏好/ 商务舱 $('.btn-select').click(function() { $(this).siblings('.ez-arrow-container').toggle(); }); $('.Engine_list__1tGCG li').click(function() { $('.Engine_list__1tGCG li').removeClass('Engine_active__uBYex'); $(this).addClass('Engine_active__uBYex'); var selectedText = $(this).text(); $('#startcityid').val($(this).data('val')); $(this).closest('.ez-search-btn-select').find('.btn-select span').text(selectedText); $(this).closest('.ez-arrow-container').hide(); }); $('.Engine_airline-list li').click(function() { var selectedAirline = $(this).text(); $(this).closest('.ez-search-btn-select').find('.btn-select span').text(selectedAirline); $(this).closest('.ez-arrow-container').hide(); }); // 出发 目的地 $('.start-input, .end-input').click(function() { $('#popover').show(); }); let currentInput = null; $('.input').focus(function() { currentInput = $(this); console.log(currentInput.attr("id"),'currentInput') $('#popover').removeClass('startVal endVal'); $('#popover').addClass(currentInput.attr("id")) }); $('.city-list li span').click(function() { if (currentInput) { currentInput.val($(this).text()); $('#popover').hide(); $('#destpy').val($(this).data('destpy')); } }); $('#popover,.target-card').mouseleave(function() { $('#popover').hide(); }); $('.city-tab-content').hide(); // Hide all tab contents $('.city-tab-content:first').show(); // Show first tab content $('.ez-tab-item').click(function() { // Remove active class from all tabs and hide all contents $('.ez-tab-item').parent().removeClass('active'); $('.city-tab-content').hide(); $(this).parent().addClass('active'); var index = $(this).parent().index(); $('.city-tab-content').eq(index).show(); }); // 去程/ 返程 $('.J-datepicker-range-day').datePicker({ hasShortcut: false, format: 'YYYY-MM-DD', isRange: true, }); // 人数 0 成人・0 儿童・0 婴儿 $('.ez-search-people-text').click(function() { $('#ez-js').show(); // Show the modal }); $('#ez-js,.target-card').mouseleave(function() { $('#ez-js').hide(); // Hide the modal }); function updateSummary() { const adults = parseInt($('.adult-val').text()); const children = parseInt($('.child-val').text()); const infants = parseInt($('.infant-val').text()); $('#summary-text').text(`${adults} 成人・${children} 儿童・${infants} 婴儿`); } $('.control-btn-plus').click(function() { const $numberVal = $(this).siblings('div').find('.number-val'); let currentVal = parseInt($numberVal.text()); $numberVal.text(currentVal + 1); // Increment value updateSummary(); // Update summary text }); $('.control-btn-jian').click(function() { const $numberVal = $(this).siblings('div').find('.number-val'); let currentVal = parseInt($numberVal.text()); if (currentVal > 0) { $numberVal.text(currentVal - 1); // Decrement value updateSummary(); // Update summary text } }); }); // 热们话题 var mySwiper = new Swiper('.ArticleQuintRibbon_swiper__TE0tj', { spaceBetween: 20, slidesPerView: 5, autoplay: { delay: 4000, disableOnInteraction: false, }, navigation: { nextEl: ".swiper-banner-next", prevEl: ".swiper-banner-prev", }, }); $("#range").ionRangeSlider({ min: 0, max: 3500, from:500, to: 1500, type: 'double',//设置类型 step: 1, prefix: "",//设置数值前缀 postfix: "",//设置数值后缀 prettify: false, hasGrid: false }); // Initially show only the first 4 items $('.select-items').each(function() { $(this).find('.select-ch-item:lt(4)').addClass('visible'); if ($(this).find('.select-ch-item').length <= 4) { $(this).find('.select-arror').hide(); } }); // Toggle visibility on click $('.select-arror').click(function() { var $selectItems = $(this).parent('.select-items'); var $hiddenItems = $selectItems.find('.select-ch-item:not(.visible)'); if ($hiddenItems.length > 0) { // Show all items $selectItems.find('.select-ch-item').addClass('visible'); $(this).find('span').first().hide(); // Hide "查看更多" $(this).find('span').eq(1).show(); // Show "收起" $(this).addClass("active") } else { // Hide items beyond the first 4 $selectItems.find('.select-ch-item:gt(3)').removeClass('visible'); $(this).find('span').first().show(); // Show "查看更多" $(this).find('span').eq(1).hide(); // Hide "收起" $(this).removeClass("active") } }); // Initially set the "查看更多" and "收起" visibility $('.select-arror').each(function() { $(this).find('span').first().show(); // "查看更多" $(this).find('span').eq(1).hide(); // "收起" });