1(function ($) { 2 'use strict'; 3 var body = $('body'); 4 5 jQuery(function($) { 6 $('.stt-instagram-content').each(function () { 7 let t = $(this), 8 number = t.data('number'), 9 name = t.data('name'); 10 11 var data = t.serializeArray(); 12 data.push({ 13 name: 'number', 14 value: number 15 }, { 16 name: 'name', 17 value: name 18 }, 19 { 20 name: 'action', 21 value: t.data('action') 22 }, 23 ); 24 $.post(st_params.ajax_url, data, function (respon) { 25 if (typeof respon == 'object') { 26 if (respon.status === 1) { 27 28 $('.stt-list-image', t).html(respon.html); 29 $('.stt-list-image .owl-carousel', t).owlCarousel({ 30 loop: true, 31 items: 5, 32 responsiveClass: true, 33 dots: false, 34 nav: false, 35 responsive: { 36 0: { 37 items: 2, 38 39 }, 40 767: { 41 items: 4, 42 43 }, 44 1200: { 45 items: 5, 46 47 } 48 } 49 }); 50 } 51 } 52 }, 'json'); 53 54 }); 55 56 setTimeout(function () { 57 $('.tour-slider-wrapper').each(function () { 58 let t = $(this); 59 if(body.hasClass('rtl')){ 60 var rtl_check=true; 61 } else { 62 var rtl_check=false; 63 } 64 var owl = $('.owl-carousel', t).owlCarousel({ 65 center: true, 66 items: 1, 67 rtl:rtl_check, 68 loop: true, 69 autoplay: true, 70 margin: 0, 71 }); 72 $('.st-next', t).on('click',function (ev) { 73 ev.preventDefault(); 74 owl.trigger('next.owl.carousel'); 75 }) 76 $('.st-pre', t).on('click',function (ev) { 77 ev.preventDefault(); 78 owl.trigger('prev.owl.carousel'); 79 }) 80 81 }); 82 }, 100); 83 $('.category-slider-wrapper').each(function () { 84 let t = $(this); 85 $('.owl-carousel', t).owlCarousel({ 86 loop: true, 87 margin: 30, 88 items: 4, 89 responsiveClass: true, 90 dots: true, 91 nav: true, 92 responsive: { 93 0: { 94 items: 2, 95 nav: false, 96 margin: 15, 97 }, 98 767: { 99 items: 3, 100 nav: true, 101 }, 102 1200: { 103 items: 4, 104 nav: true, 105 } 106 } 107 }); 108 109 }); 110 111 112 113 //----------- Description Tour------------------------------- 114 115 $('.st-description-more .stt-more').on('click', function () { 116 117 $('.st-description-more').hide(); 118 $('.st-description-less').show(); 119 }); 120 $('.st-description-less .stt-less').on('click', function () { 121 122 $('.st-description-less').hide(); 123 $('.st-description-more').show(); 124 }); 125 //----------- End Description Tour--------------------------- 126 //----------- Content Comment-------------------------------- 127 $('.comment-item').each(function () { 128 let that = this; 129 $('.st-comment-more .stt-more', that).on('click', function (e) { 130 131 $('.st-comment-less', that).show(); 132 $('.st-comment-more', that).hide(); 133 }) 134 }); 135 $('.comment-item').each(function () { 136 let that = this; 137 $('.st-comment-less .stt-less', that).on('click', function (e) { 138 139 $('.st-comment-more', that).show(); 140 $('.st-comment-less', that).hide(); 141 }) 142 }); 143 144 //----------- End Content Comment---------------------------- 145 //--------------- Guest Name Inputs ------------------------- 146 147 var adultNumber = $('.form-has-guest-name .adult_number'); 148 var childrenNumber = $('.form-has-guest-name .child_number'); 149 var infantNumber = $('.form-has-guest-name .infant_number'); 150 var guestNameInput = $('.form-has-guest-name .guest_name_input'); 151 adultNumber.on('change', triggerGuestInputChange); 152 childrenNumber.on('change', triggerGuestInputChange); 153 infantNumber.on('change', triggerGuestInputChange); 154 155 function triggerGuestInputChange(e) { 156 guestNameInput.trigger('guest-change', { 157 'adult': parseInt(adultNumber.val()), 158 'children': parseInt(childrenNumber.val()), 159 'infant': parseInt(infantNumber.val()) 160 }); 161 } 162 ; 163 164 guestNameInput.on('guest-change', function (e, number) { 165 var adult = number.adult; 166 var children = number.children; 167 var infant = number.infant; 168 var hideAdult = $(this).data('hide-adult'); 169 var hideChildren = $(this).data('hide-children'); 170 var hideInfant = $(this).data('hide-infant'); 171 var controlWraps = $(this).find('.guest_name_control'); 172 var controls = controlWraps.find('.control-item'); 173 if (isNaN(infant)) 174 infant = 0; 175 if (isNaN(children)) 176 children = 0; 177 178 if (hideAdult == 'on') { 179 adult = 0; 180 } 181 182 if (typeof hideChildren == 'undefined' || hideChildren != 'on') 183 adult += children; 184 if (typeof hideInfant == 'undefined' || hideInfant != 'on') 185 adult += infant; 186 187 //adult-=1;// Only input guest >=2 name 188 189 if (adult <= 0) { 190 $(this).addClass('hidden'); 191 } else { 192 // Append
193 for (var i = controls.length ? (controls.length) : 0; i < adult; i++) 194 { 195 var div = $($('#guest_name_control_item').clone().html()); 196 var p = div.find('input').attr('placeholder'); 197 div.find('input').attr('placeholder', p.replace('%d', i + 1)); 198 199 controlWraps.append(div); 200 } 201 202 // Remove 203 controls.each(function () { 204 if ($(this).index() > adult - 1) 205 { 206 $(this).remove(); 207 } 208 }); 209 210 $(this).removeClass('hidden'); 211 } 212 }); 213 214 triggerGuestInputChange(); 215 //------------------End Guest Name Inputs ------------------- 216 $('.form-book-tour').each(function () { 217 var parent = $(this); 218 $('.dropdown', parent).on('click',function (e) { 219 var dropdown_menu = $('[aria-labelledby="' + $(this).attr('id') + '"]', parent); 220 $('.form-book--tour').find('.dropdown-menu').not(dropdown_menu).slideUp(50); 221 dropdown_menu.slideToggle(50); 222 if ($('.ovscroll').length) { 223 $('.ovscroll').getNiceScroll().resize(); 224 } 225 }); 226 $('input[name="adult_number"]', parent).on('change',function () { 227 228 var adults = parseInt($(this).val()); 229 var html = adults; 230 if (typeof adults == 'number') { 231 if (adults < 1) { 232 html = $('.render .adult', parent).data('text') + ' x ' + adults; 233 } else { 234 html = $('.render .adult', parent).data('text-multi') + ' x ' + adults; 235 } 236 } 237 $('.render .adult', parent).html(html); 238 }); 239 $('input[name="adult_number"]', parent).trigger('change'); 240 $('input[name="child_number"]', parent).on('change',function () { 241 242 var children = parseInt($(this).val()); 243 var html = children; 244 if (typeof children == 'number') { 245 if (children < 1) { 246 html = $('.render .children', parent).data('text') + ' x ' + children; 247 } else { 248 html = $('.render .children', parent).data('text-multi') + ' x ' + children; 249 } 250 } 251 $('.render .children', parent).html(html); 252 }); 253 $('input[name="child_number"]', parent).trigger('change'); 254 $('input[name="infant_number"]', parent).on('change',function () { 255 256 var infant = parseInt($(this).val()); 257 var html = infant; 258 if (typeof infant == 'number') { 259 if (infant < 1) { 260 html = $('.render .infant', parent).data('text') + ' x ' + infant; 261 } else { 262 html = $('.render .infant', parent).data('text-multi') + ' x ' + infant; 263 } 264 } 265 $('.render .infant', parent).html(html); 266 }); 267 $('input[name="infant_number"]', parent).trigger('change'); 268 }); 269 /*Scroll form book*/ 270 var timeout_fixed_item; 271 $(window).on('resize', function () { 272 clearTimeout(timeout_fixed_item); 273 timeout_fixed_item = setTimeout(function () { 274 $('.st-tour-booking', body).each(function () { 275 var t = $(this); 276 var screen = t.data('screen'); 277 var width = t.width(), 278 top = t.offset().top; 279 $(window).on('scroll', function () { 280 if ($(window).scrollTop() >= top && window.matchMedia('(min-width: ' + screen + ')').matches) { 281 if (t.css('position') != 'fixed') { 282 if($('#wpadminbar').height()){ 283 var top_height = $('#wpadminbar').height(); 284 } else { 285 top_height = 0; 286 } 287 t.css({ 288 width: width, 289 position: 'fixed', 290 top: top_height + 'px', 291 'z-index': 9 292 }); 293 } 294 if ($('.stoped-scroll-section', body).length) { 295 var room_position = $('.stoped-scroll-section', body).offset().top; 296 if ($(window).scrollTop() + t.innerHe
296ight() >= room_position && t.css('position') == 'fixed') { 297 t.css({ 298 width: width, 299 position: 'fixed', 300 top: room_position - $(window).scrollTop() - t.innerHeight(), 301 'z-index': 9 302 }); 303 } else { 304 if($('#wpadminbar').height()){ 305 var top_height = $('#wpadminbar').height(); 306 } else { 307 top_height = 0; 308 } 309 t.css({ 310 width: width, 311 position: 'fixed', 312 top: top_height + 'px', 313 'z-index': 9 314 }); 315 } 316 } 317 } else { 318 t.css({ 319 position: '', 320 top: '', 321 width: 'auto', 322 'z-index': '' 323 }) 324 } 325 }); 326 }); 327 $('.hotel-target-book-mobile', body).each(function () { 328 var t = $(this); 329 $(window).on('scroll', function () { 330 if ($(window).scrollTop() >= 50 && window.matchMedia('(max-width: 991px)').matches) { 331 t.css('display', 'flex'); 332 } else { 333 t.css('display', 'none'); 334 } 335 }); 336 }); 337 }, 1000); 338 }).trigger('resize'); 339 340 341 342 343 344 /*get height content testionial*/ 345 $('.st-testimonial-solo-slider', '.st-solo-testimonial-wrapper').each(function () { 346 var parent = $(this); 347 var height_content = $('.content', parent).innerHeight(); 348 var margin_top = $('.content', parent).position(); 349 var top = parseInt(height_content) + parseInt(margin_top.top); 350 $('.owl-dots', parent).css("top", top); 351 }); 352 /*popup login mobile*/ 353 $('.toggle-menu--user').on('click',function (ev) { 354 ev.preventDefault(); 355 $('#st-login-form').modal('toggle'); 356 $('#st-login-form').modal('show'); 357 }); 358 $('.back-menu--login').on('click',function (ev) { 359 ev.preventDefault(); 360 toggleBody($('.header-login--mobile')); 361 $('.header-login--mobile').toggleClass('open'); 362 }); 363 $('.toggle-menu', '.header').on('click',function (ev) { 364 ev.preventDefault(); 365 toggleBody($('.st-list-mobile')); 366 $('.st-list-mobile').toggleClass('open'); 367 }); 368 $('.back-menu', '.header').on('click',function (ev) { 369 ev.preventDefault(); 370 toggleBody($('.st-list-mobile')); 371 $('.st-list-mobile').toggleClass('open'); 372 }); 373 function toggleBody(el) { 374 if (el.hasClass('open')) { 375 body.css({ 376 'overflow': '' 377 }); 378 } else { 379 body.css({ 380 'overflow': 'hidden' 381 }); 382 } 383 } 384 body.on('click',function (ev) { 385 if ($(ev.target).is('#st-main-menu')) { 386 387 $('.st-list-mobile').toggleClass('open'); 388 } 389 }); 390 /**/ 391 392 $(document).on('click', '.solo-load-more-blog', function () { 393 updateQueryStringParam('ppp', $('#solo_load_more_blog').val()); 394 location.reload(); 395 }); 396 $(document).on('change', '.search--blog-solo #cat', function () { 397 var $form = $(this).closest('form'); 398 $form.trigger('submit'); 399 }); 400 /*Slide blog about us*/ 401 402 403 404 /*Slider blog 7*/ 405 $(window).on('resize',function(){ 406 $('.st-solo-blog-list').find('.style7').each(function () { 407 let t = $(this); 408 t.removeClass('row'); 409 t.addClass('owl-carousel'); 410 t.owlCarousel({ 411 loop: false, 412 responsiveClass: true, 413 nav: false, 414 margin: 30, 415 responsive: { 416 0: { 417 items: 1, 418 nav: false, 419 dots: true, 420 }, 421 768: { 422 items: 2, 423 }, 424 992: { 425 items: 3, 426 dots:false, 427 }, 428 1200: { 429 items: 3, 430 } 431 } 432 }); 433 }); 434 }); 435 /*end*/ 436 /*Slide list image about us*/ 437 438 var image_aboutus = undefined; 439 $(window).on('resize',function(){ 440 if (window.matchMedia("(max-width:767px)").matches) { 441 $('.st-aboutus-solo').find('.slide-item').each(function () { 442 let t = $(this); 443 t.addClass('owl-carousel'); 444 let options = { 445 loop: false, 446 responsiveClass: true, 447 dots: true, 448 nav: false, 449 margin: 15, 450 stagePadding: 40, 451 responsive: { 452 0: { 453 items: 1, 454 nav: false, 455 456 }, 457 576: { 458 items: 1, 459 }, 460 767: { 461 items: 1, 462 } 463 } 464 }; 465 if(typeof image_aboutus == 'undefined'){ 466 let owl = $('.owl-carousel').owlCarousel(options); 467 image_aboutus = t.data('owl.carousel'); 468 }else{ 469 let owl = $('.owl-carousel').owlCarousel(options); 470 image_aboutus = t.data('owl.carousel'); 471 } 472 473 }); 474 }else{ 475 $('.slide-item').removeClass('owl-carousel'); 476 if(typeof image_aboutus == 'object'){ 477 image_aboutus.destroy(); 478 } 479 480 } 481 }).trigger('resize'); 482 /*end*/ 483 484 485 /*Slider Service single*/ 486 $('.st-list-tour--slide').each(function(){ 487 $(this).owlCarousel({ 488 loop: false, 489 items: 3, 490 margin: 30, 491 responsiveClass: true, 492 dots: false, 493 nav: false, 494 responsive: { 495 0: { 496 items: 1, 497 margin: 15, 498 dots: true, 499 }, 500 768: { 501 items: 2, 502 margin: 30, 503 dots:true, 504 }, 505 992: { 506 items: 3, 507 margin: 30, 508 dots:false 509 }, 510 1200: { 511 items: 3, 512 } 513 } 514 }); 515 });; 516 /*end*/ 517 /*Slide tour destination*/ 518 $('.st-solo-list-location').find('.list-destination--layout9').each(function () { 519 let t = $(this); 520 t.addClass('owl-carousel'); 521 t.removeClass('row'); 522 // $('.normal-item', t).removeClass('has-matchHeight'); 523 $('.slider-item', t).removeClass('normal-item'); 524 var owl = $('.owl-carousel').owlCarousel({ 525 loop: false, 526 responsiveClass: true, 527 dots: false, 528 nav: false, 529 margin: 30, 530 responsive: { 531 0: { 532 items: 1, 533 nav: false, 534 dots: true, 535 margin: 15, 536 stagePadding: 40, 537 }, 538 768: { 539 items: 3, 540 }, 541 992:{ 542 items:4, 543 }, 544 1200: { 545 items: 4, 546 } 547 } 548 }); 549 }); 550 /*end*/ 551 $('.form-slelect-2','.form-icon-fa').select2({ 552 }); 553 $(window).on('resize', function () { 554 $('.st-tour-content.style7').find('.st-tour-booking').each(function(){ 555 var t = $(this); 556 var screen = t.data('screen'); 557 var width = t.width(), 558 top = t.offset().top; 559 $(window).on('scroll',function(){ 560 if ($(window).scrollTop() >= top && window.matchMedia('(min-width: ' + screen + ')').matches) { 561 t.addClass('box-shadow-croll'); 562 } 563 else{ 564 t.removeClass('box-shadow-croll'); 565 } 566 }); 567 }); 568 }).trigger('resize'); 569 570 function goToByScroll(id) { 571 var id = id.replace("_link", ""); 572 // Scroll 573 $('html,body').animate({ 574 scrollTop: $("#" + id).offset().top 575 }, 'slow'); 576 } 577 $(".single .button_reserve").on('click', function (e) { 578 // Prevent a page reload when a link is pressed 579 e.preventDefault(); 580 // Call the scroll function 581 goToByScroll($(this).attr("id")); 582 }); 583 });
584})(jQuery); 585 586function setHeight(container, item) { 587 jQuery(container).each(function () { 588 // Cache the highest 589 var highestBox = 0; 590 // Select and loop the elements you want to equalise 591 jQuery(item, this).each(function () { 592 // If this box is higher than the cached highest then store it 593 var itemH = jQuery(this).height(); 594 if (itemH > highestBox) { 595 highestBox = itemH; 596 } 597 }); 598 // Set the height of all those children to whichever was highest 599 jQuery(item, this).height(highestBox); 600 }); 601} 602let base = this; 603if (!Number.prototype.getDecimals) { 604 Number.prototype.getDecimals = function () { 605 var num = this, 606 match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); 607 if (!match) { 608 return 0; 609 } 610 return Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0)); 611 } 612} 613jQuery(document.body).on('click', '.caculator-item .fa-plus, .caculator-item .fa-minus', function ($) { 614 var $qty = jQuery(this).parent().find('.extra-service-select'), 615 currentVal = parseFloat($qty.val()), 616 max = parseFloat($qty.attr('max')), 617 min = parseFloat($qty.attr('min')), 618 step = parseInt($qty.attr('step')); 619 620 // Format values 621 if (!currentVal || currentVal === '' || currentVal === 'NaN') currentVal = 0; 622 if (max === '' || max === 'NaN') max = ''; 623 if (min === '' || min === 'NaN') min = 0; 624 if (step === 'any' || step === '' || step === undefined || parseFloat(step) === 'NaN') step = 1; 625 626 // Change the value 627 if (jQuery(this).is('.fa-plus')) { 628 if (max && (currentVal >= max)) { 629 $qty.val(max); 630 } else { 631 $qty.val((currentVal + parseFloat(step)).toFixed(step.getDecimals())); 632 } 633 } else { 634 if (min && (currentVal <= min)) { 635 $qty.val(min); 636 } else if (currentVal > 0) { 637 $qty.val((currentVal - parseFloat(step)).toFixed(step.getDecimals())); 638 } 639 } 640 641 // Trigger change event 642 $qty.trigger('change'); 643 $qty.trigger('tour-booking-form'); 644}); 645 646jQuery( "body" ).on('click', function(event) { 647 var target = jQuery( event.target ); 648 if (!target.closest(".form-more-extra-solo").length) { 649 jQuery('ul#dropdown-more-extra').removeClass("dropdown-menu extras collapse in"); 650 jQuery('ul#dropdown-more-extra').addClass("dropdown-menu extras collapse"); 651 jQuery('ul#dropdown-more-extra').attr("aria-expanded",false); 652 jQuery('a.dropdown-more-extra').attr("aria-expanded",false); 653 } 654}); 655//Hide Daterangepicker when scroll 656jQuery(function($){ 657 $('body').on('mousewheel',function(){ 658 if($('.daterangepicker.moveleft.opensleft').length){ 659 $('.daterangepicker.moveleft.opensleft').hide(); 660 } 661 }); 662});
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.