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