fix : update breadcrumb
, flightShow , sidebar
This commit is contained in:
+21
-21
@@ -26,7 +26,7 @@ Version : 1.1
|
||||
|
||||
|
||||
|
||||
// data-background
|
||||
// data-background
|
||||
$(document).on('ready', function () {
|
||||
$("[data-background]").each(function () {
|
||||
$(this).css("background-image", "url(" + $(this).attr("data-background") + ")");
|
||||
@@ -99,7 +99,7 @@ Version : 1.1
|
||||
items: 1,
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// partner-slider
|
||||
$('.partner-slider').owlCarousel({
|
||||
@@ -401,13 +401,13 @@ Version : 1.1
|
||||
}
|
||||
|
||||
|
||||
// search date picker
|
||||
// search date picker
|
||||
if ($('.date-picker').length) {
|
||||
$(".date-picker").datepicker();
|
||||
}
|
||||
|
||||
|
||||
// find-car time picker
|
||||
// find-car time picker
|
||||
if ($('.time-picker').length) {
|
||||
$(function () {
|
||||
$(".time-picker").timepicker();
|
||||
@@ -415,19 +415,19 @@ Version : 1.1
|
||||
}
|
||||
|
||||
|
||||
// flight type search form
|
||||
$('.flight-type .form-check-input').change(function (e) {
|
||||
// flights type search form
|
||||
$('.flights-type .form-check-input').change(function (e) {
|
||||
var ft = $(this).val();
|
||||
if (ft === "round-way") {
|
||||
$('.flight-search .search-form-return').show();
|
||||
$('.flights-search .search-form-return').show();
|
||||
$('.have-to-clone').hide();
|
||||
$('.another-item').remove();
|
||||
} else if (ft === "multi-city") {
|
||||
$('.flight-search .search-form-return').hide();
|
||||
$('.flights-search .search-form-return').hide();
|
||||
$('.have-to-clone').show();
|
||||
$('.another-item').remove();
|
||||
} else {
|
||||
$('.flight-search .search-form-return').hide();
|
||||
$('.flights-search .search-form-return').hide();
|
||||
$('.have-to-clone').hide();
|
||||
$('.another-item').remove();
|
||||
}
|
||||
@@ -510,11 +510,11 @@ Version : 1.1
|
||||
// search multicity form
|
||||
$(".multicity-btn").click(function () {
|
||||
|
||||
if (document.querySelectorAll('.flight-search-item').length === 5) {
|
||||
if (document.querySelectorAll('.flights-search-item').length === 5) {
|
||||
return alert("Maximum Flight Limit Reached!!");
|
||||
}
|
||||
|
||||
$('.flight-multicity-item .date-picker').datepicker('destroy');
|
||||
$('.flights-multicity-item .date-picker').datepicker('destroy');
|
||||
|
||||
var cloneMulticity = $(".have-to-clone").clone();
|
||||
cloneMulticity.removeClass("have-to-clone");
|
||||
@@ -522,10 +522,10 @@ Version : 1.1
|
||||
|
||||
cloneMulticity.find(".multicity-btn").addClass("multicity-item-remove").html(`<div>
|
||||
<i class="fal fa-circle-xmark"></i> Remove Flight</div>`);
|
||||
$(".flight-search-content").append(cloneMulticity);
|
||||
$(".flights-search-content").append(cloneMulticity);
|
||||
|
||||
var i = 0;
|
||||
$('.flight-multicity-item .date-picker').each(function () {
|
||||
$('.flights-multicity-item .date-picker').each(function () {
|
||||
$(this).attr("id", 'date' + i).datepicker();
|
||||
i++;
|
||||
});
|
||||
@@ -533,22 +533,22 @@ Version : 1.1
|
||||
});
|
||||
|
||||
$(document).on('click', '.multicity-item-remove', function () {
|
||||
$(this).parent().closest('.flight-multicity-item').remove();
|
||||
$(this).parent().closest('.flights-multicity-item').remove();
|
||||
});
|
||||
|
||||
$(document).on('change', '.flight-multicity-item .date-picker', function (e) {
|
||||
$(document).on('change', '.flights-multicity-item .date-picker', function (e) {
|
||||
var jd = $(e.target).val();
|
||||
const journeyDayName = new Date(jd).toLocaleString('en-us', { weekday: 'long' });
|
||||
$(e.target).closest(".flight-multicity-item").find('.journey-day-name').html(journeyDayName);
|
||||
$(e.target).closest(".flights-multicity-item").find('.journey-day-name').html(journeyDayName);
|
||||
});
|
||||
|
||||
|
||||
// swap search form value
|
||||
$(document).on('click', '.flight-search-item .search-form-swap', function (e) {
|
||||
var swapFrom = $(e.target).closest(".flight-search-item").find('.swap-from').val();
|
||||
var swapTo = $(e.target).closest(".flight-search-item").find('.swap-to').val();
|
||||
$(e.target).closest(".flight-search-item").find('.swap-from').val(swapTo);
|
||||
$(e.target).closest(".flight-search-item").find('.swap-to').val(swapFrom);
|
||||
$(document).on('click', '.flights-search-item .search-form-swap', function (e) {
|
||||
var swapFrom = $(e.target).closest(".flights-search-item").find('.swap-from').val();
|
||||
var swapTo = $(e.target).closest(".flights-search-item").find('.swap-to').val();
|
||||
$(e.target).closest(".flights-search-item").find('.swap-from').val(swapTo);
|
||||
$(e.target).closest(".flights-search-item").find('.swap-to').val(swapFrom);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user