$(res_form).css("left", x_pos - (length - book_width) + "px");
});
-// $("#start-date").on("click", function () {
-// if($(this).find(".jrdp_calendar_pos").has('table')){
-// if ($(window).width() < 1024) {
-// console.debug($(this).find("#start-jrdatepicker").css("position"));
-// }
-// }
-// });
-
- var off_canvas_arrival = $(".right-off-canvas-menu").find("#start-date");
- var off_canvas_departure = $(".right-off-canvas-menu").find("#end-date");
-
-// $(off_canvas_arrival).removeClass("date-pick").removeAttr("onclick").removeAttr("value");
-// $(off_canvas_departure).removeClass("date-pick").removeAttr("onclick").removeAttr("value");
-
-// $(off_canvas_arrival).datepicker({
-
-// minDate: 0,
-// beforeShow: function (input, inst) {
-// setTimeout(function () {
-// inst.dpDiv.css({
-// top: 100,
-// left: 50
-// });
-// }, 0);
-// }
-// });
-
-
- var depart_min, min_date, y, m, d;
-// $(off_canvas_arrival).change( function () {
-//
-// min_date = $(this).datepicker('getDate', '+1d');
-// min_date.setDate(min_date.getDate() + 1);
-
-// $(off_canvas_departure).datepicker('setDate', min_date);
-// $(off_canvas_departure).datepicker('option','minDate', min_date );
-//
-// });
-// $(off_canvas_departure).datepicker({
-//// beforeShow: function (input, inst) {
-//// setTimeout(function () {
-//// inst.dpDiv.css({
-//// top: 100,
-//// left: 50
-//// });
-//// }, 0);
-//// }
-// });
-
-
-
$("header").find('ul').find('li').children('a').on("click", function (){
if($(".searchform").css("display") === "none"){
$(".searchform").slideDown("slow", function() {
var start_datepicker_large = $("#resContent").find("#start-jrdatepicker");
var end_datepicker_large = $("#resContent").find("#end-jrdatepicker");
- if ($(window).width() < 1024) {
- $(start_date).attr("id", "none")
- $(end_date).attr("id", "none");
- $(start_datepicker_large).attr("id", "none");
- $(end_datepicker_large).attr("id", "none");
-
- } else {
- $(start_date).attr("id", "start-date")
- $(end_date).attr("id", "end-date");
- $(start_datepicker_large).attr("id", "start-jrdatepicker");
- $(end_datepicker_large).attr("id", "end-jrdatepicker");
- }
- $(window).resize( function () {
+ function remove_datepicker(){
if ($(window).width() < 1024) {
- $(start_date).attr("id", "none");
- $(end_date).attr("id", "none");
- $(start_datepicker_large).attr("id", "none");
- $(end_datepicker_large).attr("id", "none");
-
+ $(start_date).attr("id", "none")
+ $(end_date).attr("id", "none");
+ $(start_datepicker_large).attr("id", "none");
+ $(end_datepicker_large).attr("id", "none");
+
} else {
- $(start_date).attr("id", "start-date");
- $(end_date).attr("id", "end-date");
+ $(start_date).attr("id", "start-date")
+ $(end_date).attr("id", "end-date");
$(start_datepicker_large).attr("id", "start-jrdatepicker");
$(end_datepicker_large).attr("id", "end-jrdatepicker");
}
+ }
+ remove_datepicker();
+
+ $(window).resize( function () {
+ remove_datepicker();
});
function check_window_width(){
}
check_window_width();
-
});
$(res_form).css("left", x_pos - (length - book_width) + "px");
});
-// $("#start-date").on("click", function () {
-// if($(this).find(".jrdp_calendar_pos").has('table')){
-// if ($(window).width() < 1024) {
-// console.debug($(this).find("#start-jrdatepicker").css("position"));
-// }
-// }
-// });
-
- var off_canvas_arrival = $(".right-off-canvas-menu").find("#start-date");
- var off_canvas_departure = $(".right-off-canvas-menu").find("#end-date");
-
-// $(off_canvas_arrival).removeClass("date-pick").removeAttr("onclick").removeAttr("value");
-// $(off_canvas_departure).removeClass("date-pick").removeAttr("onclick").removeAttr("value");
-
-// $(off_canvas_arrival).datepicker({
-
-// minDate: 0,
-// beforeShow: function (input, inst) {
-// setTimeout(function () {
-// inst.dpDiv.css({
-// top: 100,
-// left: 50
-// });
-// }, 0);
-// }
-// });
-
-
- var depart_min, min_date, y, m, d;
-// $(off_canvas_arrival).change( function () {
-//
-// min_date = $(this).datepicker('getDate', '+1d');
-// min_date.setDate(min_date.getDate() + 1);
-
-// $(off_canvas_departure).datepicker('setDate', min_date);
-// $(off_canvas_departure).datepicker('option','minDate', min_date );
-//
-// });
-// $(off_canvas_departure).datepicker({
-//// beforeShow: function (input, inst) {
-//// setTimeout(function () {
-//// inst.dpDiv.css({
-//// top: 100,
-//// left: 50
-//// });
-//// }, 0);
-//// }
-// });
-
-
-
$("header").find('ul').find('li').children('a').on("click", function (){
if($(".searchform").css("display") === "none"){
$(".searchform").slideDown("slow", function() {
var start_datepicker_large = $("#resContent").find("#start-jrdatepicker");
var end_datepicker_large = $("#resContent").find("#end-jrdatepicker");
- if ($(window).width() < 1024) {
- $(start_date).attr("id", "none")
- $(end_date).attr("id", "none");
- $(start_datepicker_large).attr("id", "none");
- $(end_datepicker_large).attr("id", "none");
-
- } else {
- $(start_date).attr("id", "start-date")
- $(end_date).attr("id", "end-date");
- $(start_datepicker_large).attr("id", "start-jrdatepicker");
- $(end_datepicker_large).attr("id", "end-jrdatepicker");
- }
- $(window).resize( function () {
+ function remove_datepicker(){
if ($(window).width() < 1024) {
- $(start_date).attr("id", "none");
- $(end_date).attr("id", "none");
- $(start_datepicker_large).attr("id", "none");
- $(end_datepicker_large).attr("id", "none");
-
+ $(start_date).attr("id", "none")
+ $(end_date).attr("id", "none");
+ $(start_datepicker_large).attr("id", "none");
+ $(end_datepicker_large).attr("id", "none");
+
} else {
- $(start_date).attr("id", "start-date");
- $(end_date).attr("id", "end-date");
+ $(start_date).attr("id", "start-date")
+ $(end_date).attr("id", "end-date");
$(start_datepicker_large).attr("id", "start-jrdatepicker");
$(end_datepicker_large).attr("id", "end-jrdatepicker");
}
+ }
+ remove_datepicker();
+
+ $(window).resize( function () {
+ remove_datepicker();
});
function check_window_width(){
}
check_window_width();
-
});