| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2c.hellogtx.com/public/template7/assets/js/ |
Upload File : |
$(document).ready(function() {
// radio one-two-multi-way start
$(".flight-clsrdoRoundTrip").click(function() {
$("#flight-clsdivOneWayRT").show();
$("#flight-clsdivMulticity").hide();
});
$("#flight-clsrdoOneWayDate").click(function() {
$("#flight-clsdivMulticity").hide();
$("#flight-clsdivOneWayRT").show();
});
$("#flight-clsmltcity").click(function() {
$("#flight-clsdivMulticity").show();
$("#flight-clsdivOneWayRT").hide();
});
$(".flight-clsrdoRoundTrip").click(function() {
$("#flight-clsrdatelbl").addClass("flight-clsdate-enable");
});
$("#flight-clsdivCross").click(function() {
$("#flight-clsrdatelbl").css({ "opacity": "0.4" });
$("#flight-clsrdatelbl").removeClass("flight-clsdate-enable");
});
$("#flight-clsrdoOneWayDate").click(function() {
$("#flight-clsrdatelbl").removeClass("flight-clsdate-enable");
});
// radio one-two-multi-way ends
// traveller select start
$(".flight-clstrvsc").click(function() {
$(".flight-clsn-trvl-dtl, .flight-clsopct").show();
});
$(".flight-clsn-trvl-dtl-r").click(function() {
var TotalPax = 0;
$('.flight-clsn-trvl-dtl input[type=radio]').each(function() {
if (this.checked) {
TotalPax += parseInt($(this).val());
//console.log(parseInt($(this).val()));
}
});
$('#flight-clsspnTraveller').html(TotalPax);
$(".flight-clsn-trvl-dtl, .flight-clsopct").hide();
});
// select class start
$(".flight-clsoptclss").click(function() {
$("#flight-clsselectClass, .flight-clsopct").show();
});
$(".flight-clsclose_class").click(function() {
$("#flight-clsselectClass, .flight-clsopct").hide();
});
$(".flight-clsBtnclass_v2").click(function() {
$("#flight-clsselectClass, .flight-clsopct").hide();
});
// Datepicker start
$('#flight-clsddate, #flight-clsrdate, #flight-clsddate2, #flight-clsrdate2').datepicker({
dateFormat: 'm/d/yy',
beforeShow: function() {
if ($(window).width() < 768) {
return { numberOfMonths: 12 };
} else {
return { numberOfMonths: 2 };
}
}
});
// $("#from, #to").datepicker({
// //defaultDate: "+1w",
// changeMonth: false,
// dateFormat: "d M yy",
// numberOfMonths: 2,
// showButtonPanel: true,
// buttonImage: true,
// buttonImageOnly: true,Readonly: true,
// minDate: 0,
// beforeShow: function() {
// if (this.id == 'to') {
// var dateMin = $('#from').datepicker("getDate");
// var TodateMin = $('#to').datepicker("getDate");
// if (TodateMin === null) {
// TodateMin = dateMin;
// }
// var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
// var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
// var c_out_date = new Date(TodateMin.getFullYear(), TodateMin.getMonth(), TodateMin.getDate()); // Min Date = Selected + 1d
// $('#to').datepicker("option", "minDate", rMin);
// $('#to').datepicker("option", "maxDate", rMax);
// $('#to').datepicker("setDate", c_out_date);
// $('#RoundTrip').prop('checked', true);
// if ($(window).width() < 768) {
// $('#to').datepicker("option", "numberOfMonths", 12);
// } else {
// $('#to').datepicker("option", "numberOfMonths", 2);
// }
// $(".flight-clsretu-date-n").attr('style', 'opacity: 1 !important');
// }
// if ($(window).width() < 768) {
// $('#from').datepicker("option", "numberOfMonths", 12);
// } else {
// $('#from').datepicker("option", "numberOfMonths", 2);
// }
// },
// onSelect: function(selectedDate, inst) {
// var tripType = $('.tripType:checked').val(); // retrieve the value
// $('.flightsubmit_searchflight').prop("disabled", false);
// if (this.id == 'from') {
// var dateMin = $('#from').datepicker("getDate");
// var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
// var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
// var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
// var theDate = new Date(Date.parse($(this).datepicker('getDate')));
// var dateFormatted = $.datepicker.formatDate('DD', theDate);
// var FromFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
// $('.Departure').html(dateFormatted);
// $('#departure_date').val(FromFormatted);
// if (parseInt(tripType) === 2) {
// $('#to').datepicker("option", "minDate", rMin);
// $('#to').datepicker("option", "maxDate", rMax);
// $('#to').datepicker("setDate", c_out_date);
// $('.Return').html(dateFormatted);
// }
// // console.log(c_out_date);
// ///$('#to').focus();return false;
// } else {
// var dateMin = $('#to').datepicker("getDate");
// var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0);
// var theDate = new Date(Date.parse(c_out_date));
// var dateFormatted = $.datepicker.formatDate('DD', theDate);
// var ToFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
// $('.Return').html(dateFormatted);
// $('#return_date').val(ToFormatted);
// // console.log(ToFormatted);
// }
// }
// });
$(function() {
// $(".dateofbirth,.dateofbirth2,.dateofbirth3,.passportnoexpiry,.passporIssue").datepicker({
// Readonly: true
// }).attr('readonly', 'readonly');
});
// add city start
$("#flight-clsadd_btn").click(function() {
$("#flight-clsdivMulticity2").show();
});
$("#flight-clsaRemoveButton").click(function() {
$("#flight-clsdivMulticity2").hide();
});
// filter start
$(".flight-filter").click(function() {
$("#flight-filter").show();
});
$(".cancel-btn").click(function() {
$("#flight-filter").hide();
});
$(".flight-sort").click(function() {
$(".sortlisting-flight").show();
$(".flight-clsopct").show();
});
$(".cancel-btn-mb-sort").click(function() {
$(".sortlisting-flight").hide();
$(".flight-clsopct").hide();
});
$(document).ready(function() {
$(".filter-list-cls li").click(function() {
$(".filter-list-cls li").removeClass("active");
if ($(this).find('a').hasClass('active')) {
$(this).find('a').removeClass('active');
$($(this).find('a').attr('href')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$("#filter-Price").click(function() {
$("#Price-dt").show();
$("#Time-dt").hide();
$("#Stops-dt").hide();
$("#Airlines-dt").hide();
});
$("#filter-Time").click(function() {
$("#Time-dt").show();
$("#Price-dt").hide();
$("#Stops-dt").hide();
$("#Airlines-dt").hide();
});
$("#filter-Stops").click(function() {
$("#Stops-dt").show();
$("#Price-dt").hide();
$("#Time-dt").hide();
$("#Airlines-dt").hide();
});
$("#filter-Airlines").click(function() {
$("#Airlines-dt").show();
$("#Price-dt").hide();
$("#Time-dt").hide();
$("#Stops-dt").hide();
});
// collapse icons in listing page
$('.fa-chevron-circle-down').on('click', function() {
$(this).toggleClass('fa-chevron-circle-up fa-chevron-circle-down');
});
// add adult start
$(document).ready(function() {
$(document).on('click', '.addnewtravellers', function() {
var datatarget = $(this).attr('datatarget');
var b = $(this).attr('data');
$('.displaycancel').trigger('click');
var paxType = $(this).attr('paxType');
var index = $(this).attr('index');
$("#commonbtn" + b).attr('value', b);
$("#commonbtn" + b).attr('index', index);
$("#commonbtn" + b).attr('paxType', paxType);
$('#' + datatarget).slideToggle("fast");
$(".flight-clsopct").show();
});
$(document).on('click', '.displaycancel', function() {
$('.add-adults-popup-cls').slideUp("fast");
$(".flight-clsopct").hide();
});
$(document).on('click', '.TravellerList', function() {
if (this.checked) {
var data = $(this).attr('data');
var index = $(this).attr('index');
var paxType = $(this).attr('paxtype');
if (paxType == '1') {
var ModalID = 'ADULT';
} else if (paxType == '2') {
var ModalID = 'CHILD';
} else {
var ModalID = 'INFANT';
}
$(".addnewtravellersAttr").attr('data', data);
$(".addnewtravellersAttr").attr('index', index);
$(".addnewtravellersAttr").attr('paxType', paxType);
$(".addnewtravellersAttr").attr('datatarget', ModalID + '' + index);
// $('#TravelList').slideToggle("fast");
$('#TravelList').slideDown();
$(".flight-clsopct").show();
} else {
var CustomerSysId = $(this).attr('value');
var b = $(this).attr('data');
var paxType = $(this).attr('paxType');
$("#custMember_" + CustomerSysId).removeAttr('disabled');
$("#custMember_" + CustomerSysId).removeAttr('checked');
$("#custMember_" + CustomerSysId).prop('checked', false);
if (paxType == '1') {
var paxTypeName = 'Adult';
} else if (paxType == '2') {
var paxTypeName = 'Child';
} else {
var paxTypeName = 'Infant';
}
$("#CustomerSysId-" + b).val('0');
$("#passenger-firstname-" + b).val('');
$("#passenger-lastname-" + b).val('');
$("#travellerdetails" + b).html('Select ' + paxTypeName);
$("#dateofbirth-" + b).val('');
$("#travel_details" + b).html('');
$("#relation-" + b).val('0');
$("#passportno-" + b).val('');
$("#passportnoexpiry-" + b).val('');
$("#CRADULT-" + b).hide();
$("#AddEdit" + b).hide();
}
});
// $(document).on('click', '.addnewtravellers', function() {
// $('.add-adults-popup-cls').slideToggle("fast");
// $(".flight-clsopct").show();
// });
// $(document).on('click', '.displaycancel', function() {
// $('.add-adults-popup-cls').slideUp("fast");
// $(".flight-clsopct").hide();
// });
});
$(document).ready(function() {
$(document).on('click', '.sal-rad-box label', function() {
$(".sal-rad-box label").removeClass("active");
if ($(this).find('.sal-rad-box label').hasClass('active')) {
$(this).find('.sal-rad-box label').removeClass('active');
$($(this).find('.sal-rad-box label')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
// gst start
$("#gstshow").click(function() {
$(".gst-contact-form").toggle();
});
// flight selecct on click in flight result
$(document).ready(function() {
$(".fltResult, #flight-clsInfantCnt li").click(function() {
$(".fltResult, #flight-clsInfantCnt li").removeClass("active");
if ($(this).find('.fltResult, #flight-clsInfantCnt li').hasClass('active')) {
$(this).find('.fltResult, #flight-clsInfantCnt li').removeClass('active');
$($(this).find('.fltResult, #flight-clsInfantCnt li')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(" .round-fltResult-1").click(function() {
$(" .round-fltResult-1").removeClass("active");
if ($(this).find(' .round-fltResult-1').hasClass('active')) {
$(this).find(' .round-fltResult-1').removeClass('active');
$($(this).find(' .round-fltResult-1')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(" .round-fltResult-2, #flight-clsChildCnt li").click(function() {
$(" .round-fltResult-2, #flight-clsChildCnt li").removeClass("active");
if ($(this).find(' .round-fltResult-2, #flight-clsChildCnt li').hasClass('active')) {
$(this).find(' .round-fltResult-2, #flight-clsChildCnt li').removeClass('active');
$($(this).find(' .round-fltResult-2, #flight-clsChildCnt li')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$("#flight-clsadultcnt li").click(function() {
$("#flight-clsadultcnt li").removeClass("active");
if ($(this).find('#flight-clsadultcnt li').hasClass('active')) {
$(this).find('#flight-clsadultcnt li').removeClass('active');
$($(this).find('#flight-clsadultcnt li')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(".flight-wrapper-clslist").click(function() {
$(".flight-wrapper-clslist").removeClass("active");
if ($(this).find('.flight-wrapper-clslist').hasClass('active')) {
$(this).find('.flight-wrapper-clslist').removeClass('active');
$($(this).find('.flight-wrapper-clslist')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$('#flight-clslblDeparture').click(function() {
$('.flight-clsin_34').slideToggle("fast");
$(".flight-clsopct").show();
});
$('.displaycancel').click(function() {
$('.flight-clsin_34').slideUp("fast");
$(".flight-clsopct").hide();
});
});
// input feilds start
$(".flight-clsform-new").click(function() {
$('#flight-clsFromSector1').focus();
$("#flight-clsdivDepartauto").show();
$('#flight-clsFromSector1').val('');
$('#flight-clsFromSector1').autocomplete('search');
});
$(".flight-clsto-new").click(function() {
$('#flight-clsEditbox14').focus();
});
$("#flight-clsbackTosrch").click(function() {
$("#flight-clsdivDepartauto").hide();
});
// return search
$(".flight-clsto-new").click(function() {
$("#flight-clsdivArrauto").show();
$('#flight-clsEditbox14').val('');
$('#flight-clsEditbox14').autocomplete('search');
});
$("#flight-clsbackTosrch_Arr").click(function() {
$("#flight-clsdivArrauto").hide();
});
$("#flight-clslblArrival").click(function() {
$("#flight-clsdivArrauto").show();
$(".custom-nav").hide();
$("#bannerslider").addClass("mb_flightadd_city");
});
$("#flight-clsbackTosrch").click(function() {
$("#flight-clsdivArrauto").hide();
$(".custom-nav").show();
});
$("#flight-clslblDeparture1").click(function() {
$("#flight-clsdivDepartauto").show();
$(".custom-nav").hide();
$("#bannerslider").addClass("mb_flightadd_city");
});
$("#flight-clsbackTosrch").click(function() {
$("#flight-clsdivDepartauto").hide();
$(".custom-nav").show();
});
// input feilds ends
// home select city name start
$(".departurecityid").click(function() {
$(".webcity-listbox").addClass("webcity-list");
$(".sourcecitybox").addClass("sourcecityboxlist");
$("#flight-clsdivDepartauto .flight-clsclr").addClass("addclearclass");
//$("#flight-clsdivDepartauto").show();
$("#flight-clsdivArrauto").hide();
})
$(".arrivecityid").click(function() {
$(".webcity-listbox2").addClass("webcity-list2");
$(".sourcecitybox2").addClass("sourcecityboxlist2");
$("#flight-clsdivArrauto .flight-clsclr").addClass("addclearclass");
$(".addflight-clsbx_f2").addClass("addcls-addflight-clsbx_f2");
//$("#flight-clsdivArrauto").show();
$("#flight-clsdivDepartauto").hide();
})
$("#flight-clsdivArrauto .flight-clsauto_saugg ul li").click(function() {
$("#flight-clsdivArrauto").hide();
})
$("#flight-clsdivDepartauto .flight-clsauto_saugg ul li").click(function() {
$("#flight-clsdivDepartauto").hide();
})
// home select city name ends
// Scroll page on text input focus
$('.inputcls').on('focus', function() {
document.body.scrollTop = $(this).offset().top;
});
// Scroll page on text input focus
// oneway flight select start
$(document).ready(function() {
$(".fltResult-oneway, .onewayflightshow").click(function() {
$(".fltResult-oneway, .onewayflightshow").removeClass("active");
if ($(this).find('.fltResult-oneway, .onewayflightshow').hasClass('active')) {
$(this).find('.fltResult-oneway, .onewayflightshow').removeClass('active');
$($(this).find('.fltResult-oneway, .onewayflightshow')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(".onewayflightshow, .fltResult-oneway").click(function() {
$(".onewayflightshow, .fltResult-oneway").removeClass("active");
if ($(this).find('.onewayflightshow, .fltResult-oneway').hasClass('active')) {
$(this).find('.onewayflightshow, .fltResult-oneway').removeClass('active');
$($(this).find('.onewayflightshow, .fltResult-oneway')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
// oneway flight select ends
// round trip flight select start
$(document).ready(function() {
$(".roundflightone .roundtripselectflight").click(function() {
$(".roundflightone .roundtripselectflight").removeClass("active");
if ($(this).find('.roundflightone .roundtripselectflight').hasClass('active')) {
$(this).find('.roundflightone .roundtripselectflight').removeClass('active');
$($(this).find('.roundflightone .roundtripselectflight')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(".roundflighttwo .roundtripselectflight").click(function() {
$(".roundflighttwo .roundtripselectflight").removeClass("active");
if ($(this).find('.roundflighttwo .roundtripselectflight').hasClass('active')) {
$(this).find('.roundflighttwo .roundtripselectflight').removeClass('active');
$($(this).find('.roundflighttwo .roundtripselectflight')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(".roundoneselfirst, .roundflightone .roundtripselectflight ").click(function() {
$(".roundoneselfirst, .roundflightone .roundtripselectflight ").removeClass("active");
if ($(this).find('.roundoneselfirst, .roundflightone .roundtripselectflight ').hasClass('active')) {
$(this).find('.roundoneselfirst, .roundflightone .roundtripselectflight ').removeClass('active');
$($(this).find('.roundoneselfirst, .roundflightone .roundtripselectflight ')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(".roundtwoselfirst, .roundflighttwo .roundtripselectflight ").click(function() {
$(".roundtwoselfirst, .roundflighttwo .roundtripselectflight ").removeClass("active");
if ($(this).find('.roundtwoselfirst, .roundflighttwo .roundtripselectflight ').hasClass('active')) {
$(this).find('.roundtwoselfirst, .roundflighttwo .roundtripselectflight ').removeClass('active');
$($(this).find('.roundtwoselfirst, .roundflighttwo .roundtripselectflight ')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
// round trip flight select ends
// continue btn fixed on scroll start
$(window).scroll(function() {
var sticky = $('.sticky-form'),
scroll = $(window).scrollTop();
if (scroll >= 400) sticky.addClass('fixedform');
else sticky.removeClass('fixedform');
});
// continue btn fixed on scroll ends
$(window).scroll(function() {
var sticky = $('.sticky-filter'),
scroll = $(window).scrollTop();
if (scroll >= 400) sticky.addClass('fixedform');
else sticky.removeClass('fixedform');
});
});
// sorting active class start
$(document).ready(function() {
$(".sort-item-cls").click(function() {
$(".sort-item-cls").removeClass("active");
if ($(this).find('a').hasClass('active')) {
$(this).find('a').removeClass('active');
$($(this).find('a').attr('href')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
$(".sort-item-cls2").click(function() {
$(".sort-item-cls2").removeClass("active");
if ($(this).find('a').hasClass('active')) {
$(this).find('a').removeClass('active');
$($(this).find('a').attr('href')).removeClass('active');
return false;
} else {
$(this).addClass("active");
}
});
});
// sortting active class ends