1jQuery(document).ready(function( $ ){ 2 3 // $(document).on('click','#fsmLinkServiceTab li .nav-link', function(e){ 4 // $('.service-links-content .sl-content-title').matchHeight(); 5 // }); 6 7 $('#wpcf7-f2150-o1 form').addClass('la-subscribe'); 8 9 $(".detail-about .lr-grid .descriptions").readall({ 10 showheight: null, 11 showrows: 4, 12 btnClassShowmore:'btn btn-primary fsm-readmore', 13 btnClassShowless:'btn btn-primary fsm-readmore' 14 }); 15 16 $(".on-readmore-layout").readall({ 17 showheight: null, 18 showrows: 16, 19 btnClassShowmore:'btn btn-primary fsm-readmore', 20 btnClassShowless:'btn btn-primary fsm-readmore' 21 }); 22 23 $(".on-readmore-layout-advance").readall({ 24 showheight: 450, 25 // showrows: 3, 26 btnClassShowmore:'btn btn-primary fsm-readmore', 27 btnClassShowless:'btn btn-primary fsm-readmore' 28 }); 29 30 if($('.grid-gall').length){ 31 var gall_options = { 32 srcNode: 'img', // grid items (class, node) 33 margin: '20px', // margin in pixel, default: 0px 34 width: '450px', // grid item width in pixel, default: 220px 35 max_width: '', // dynamic gird item width if specified, (pixel) 36 resizable: true, // re-layout if window resize 37 transition: 'all 0.5s ease' // support transition for CSS3, default: all 0.5s ease 38 }; 39 $('.grid-gall').gridify(gall_options); 40 } 41 42 43 // Minisearch 44 $('.ds-menu-item-search a').on('click', function(e){ 45 e.preventDefault(); 46 $('.ds-menu-item-search').toggleClass('active'); 47 setTimeout(function(){ 48 $('.ds-menu-item-search.active #searchform-input').focus(); 49 }, 650); 50 }); 51 52 // Price Range 53 $("#slider-range").slider({ 54 range: true, 55 min: 0, 56 max: 150, 57 step: 5, 58 slide: function( event, ui ) { 59 $( "#min-price").html(ui.values[ 0 ]); 60 61 suffix = ''; 62 if (ui.values[ 1 ] == $( "#max-price").data('max') ){ 63 suffix = ' +'; 64 } 65 $( "#max-price").html(ui.values[ 1 ] + suffix); 66 } 67 }); 68 // EOF Price Range 69 70 $('.filter-lists li a').on('mouseover', function(){ 71 $('.filter-lists li').removeClass('active'); 72 $(this).parent().addClass('active'); 73 }); 74 75 $('.filter-lists li a').on('click', function(e){ 76 e.preventDefault(); 77 var $cat = $(this).attr('data-cat'); 78 $('.filter-lists li').removeClass('active'); 79 $(this).parent().addClass('active'); 80 $('.flexslider.carousel-contents').addClass('slider-hide'); 81 $('.flexslider.carousel-contents.'+$cat).removeClass('slider-hide'); 82 $('.flexslider.carousel-contents.'+$cat).resize(); 83 }); 84 85 $('.from-source-navigation ul li, .from-source-navigation ul li a').on('click', function(e){ 86 e.preventDefault(); 87 if($(this).is('li')){ 88 $('.from-source-navigation ul li').removeClass('active'); 89 $(this).addClass('active'); 90 var fsmData = $(this).attr('data-action'); 91 $('.content-gallery').hide(); 92 $('#'+fsmData).show(); 93 // console.log(fsmData); 94 95 } 96 if($(this).is('a')){ 97 $('.from-source-navigation ul li').removeClass('active'); 98 $(this).parent().addClass('active'); 99 var fsmData = $(this).parent().attr('data-action'); 100 $('.content-gallery').hide(); 101 $('#'+fsmData).show(); 102 // console.log(fsmData); 103 } 104 105 }); 106 107 $('.latest-article-content .la-container').matchHeight(); 108 $('.latest-article-content .la-container .la-content .la-title').matchHeight(); 109 $('.latest-article-content .la-container .la-content .la-excerpts').matchHeight(); 110 $('.invite-content .col-md-4 .iv').matchHeight(); 111 $('.invite-content .col-md-4 .iv .iv-logo').matchHeight(); 112 $('.map-section-content > div > div').matchHeight(); 113 $('.flag-container .title').matchHeight(); 114 $('.sm-maps-other-info .row > div > div ').matchHeight(); 115 $('.news-archive .la-content .la-title').matchHeight(); 116 $('.list-of-accommodation .la-content .la-excerpts').matchHeight(); 117 $('.pta-container .pta-excerpts.body-regular').matchHeight(); 118 $('.tax-mphb_ra_destination .la-container .la-excerpts.body-regular').matchHeight(); 119 120 // let items = document.querySelectorAll('.carousel .carousel-item');
121 // items.forEach((el) => { 122 // const minPerSlide = 4; 123 // let next = el.nextElementSibling; 124 // for (var i=1; i<minPerSlide; i++) { 125 // if (!next) { 126 // next = items[0] 127 // } 128 // let cloneChild = next.cloneNode(true) 129 // el.appendChild(cloneChild.children[0]) 130 // next = next.nextElementSibling 131 // } 132 // }); 133 134 // $('.flexslider.carousel-contents').flexslider({ 135 // animation: "slide", 136 // easing: "swing", 137 // controlsContainer: $(".custom-controls-container"), 138 // customDirectionNav: $(".custom-navigation a"), 139 // animationLoop: true, 140 // itemWidth: 210, 141 // itemMargin: 15, 142 // minItems: 1, 143 // maxItems: 4, 144 // end : function(slider){ 145 // jQuery('.flexslider.carousel-contents .slides li').each(function(){ 146 // slider.addSlide('<li>'+jQuery(this).html()+'</li>', slider.count); 147 // jQuery('.flexslider .slides').append('<li>'+jQuery(this).html()+'</li>'); 148 // }); 149 // } 150 // }); 151 152 $('.flexslider.hero-content').flexslider({ 153 animation: "slide" 154 }); 155 156 // let dropdowns = document.querySelectorAll('.dropdown-toggle') 157 // dropdowns.forEach((dd)=>{ 158 // dd.addEventListener('mouseover', function (e) { 159 // var el = this.nextElementSibling 160 // el.style.display = el.style.display==='block'?'none':'block' 161 // }) 162 // dd.addEventListener('mouseout', function (e) { 163 // var el = this.nextElementSibling 164 // el.style.display = el.style.display==='block'?'block':'none' 165 // }) 166 // }) 167 168 $(function() { 169 var resizeEnd; 170 $(window).on('resize', function() { 171 clearTimeout(resizeEnd); 172 resizeEnd = setTimeout(function() { 173 flexsliderResize(); 174 }, 250); 175 }); 176 }); 177 178 function flexsliderResize(){ 179 if ($('.flexslider').length > 0) { 180 $('.flexslider').data('flexslider').resize(); 181 } 182 } 183 184 /*Destination selection*/ 185 $('.field-detination').each(function () { 186 var parent = $(this); 187 var dropdown_menu = $('.dropdown-menu', parent); 188 $('li', dropdown_menu).on('click', function () { 189 var target = $(this).closest('ul.dropdown-menu').attr('aria-labelledby'); 190 var focus = parent.find('#' + target); 191 $('.destination', focus).text($(this).find('span').text()); 192 $('input[name="location_name"]', focus).val($(this).find('span').text()); 193 $('input.location_name', focus).val($(this).find('span').text()); 194 $('input[name="mphb_attributes[destination]"]', focus).val($(this).data('value')); 195 $('input.location_id', focus).val($(this).data('value')); 196 $('.st-location-new', focus).hide(); 197 $('.render-new', focus).show(); 198 if (window.matchMedia('(max-width: 767px)').matches) { 199 $('label', focus).hide(); 200 $('.render', focus).show(); 201 } 202 dropdown_menu.slideUp(50); 203 }); 204 }); 205 206 $('.form-extra-field').each(function () { 207 var parent = $(this); 208 $('.dropdown', parent).click(function (e) { 209 var dropdown_menu = $('[aria-labelledby="' +$(this).attr('id') + '"]', parent); 210 $('.form-extra-field').find('.dropdown-menu').not(dropdown_menu).slideUp(50); 211 dropdown_menu.slideToggle(50); 212 if ($('.ovscroll').length) { 213 $('.ovscroll').getNiceScroll().resize(); 214 } 215 }); 216 $('input[name="mphb_adults"]', parent).change(function () { 217 var adults = parseInt($(this).val()); 218 var html = adults; 219 if (typeof adults == 'number') { 220 if (adults < 2) { 221 html = adults + ' ' + $('.render .adult', parent).data('text'); 222 } else { 223 html = adults + ' ' + $('.render .adult', parent).data('text-multi'); 224 } 225 } 226 $('.render .adult', parent).html(html); 227 }); 228 $('input[name="mphb_adults"]', parent).trigger('change'); 229 $('input[name="mphb_children"]', parent).change(function () { 230 var children = parseInt($(this).val()); 231 var html = children; 232 if (typeof children == 'number') { 233 if (children < 2) { 234 html = children + ' ' + $('.render .children', parent).data('text'); 235 } else { 236 html = children + ' ' + $('.render .children', parent).data('text-multi'); 237 } 238 } 239 $('.render .children', parent).html(html); 240 }); 241 $('input[name="mphb_children"]', parent).trigger('change'); 242 }); 243 244 $('.st-number-wrapper').each(function () { 245 var timeOut = 0; 246 var t = $(this); 247 var input = t.find('.st-input-number'); 248 input.after('<span class="prev"><svg width="18px" height="2px" viewBox="0 0 18 2" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n' + 249 ' <!-- Generator: Sketch 49 (51002) - http://www.bohemiancoding.com/sketch -->\n' + 250 ' <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">\n' + 251 ' <g id="Tour_Detail_1" transform="translate(-1180.000000, -1085.000000)" stroke="#5E6D77" stroke-width="1.5">\n' + 252 ' <g id="check-avai" transform="translate(1034.000000, 867.000000)">\n' + 253 ' <g id="adults" transform="translate(0.000000, 184.000000)">\n' + 254 ' <g id="ico_subtract" transform="translate(147.000000, 35.000000)">\n' + 255 ' <path d="M0.5,0.038 L15.5,0.038" id="Shape"></path>\n' + 256 ' </g>\n' + 257 ' </g>\n' + 258 ' </g>\n' + 259 ' </g>\n' + 260 ' </g>\n' + 261 '</svg></span>'); 262 input.before('<span class="next"><svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n' + 263 ' <!-- Generator: Sketch 49 (51002) - http://www.bohemiancoding.com/sketch -->\n' + 264 ' <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">\n' + 265 ' <g id="Tour_Detail_1" transform="translate(-1258.000000, -1077.000000)" stroke="#5E6D77" stroke-width="1.5">\n' + 266 ' <g id="check-avai" transform="translate(1034.000000, 867.000000)">\n' + 267 ' <g id="adults" transform="translate(0.000000, 184.000000)">\n' + 268 ' <g id="ico_add" transform="translate(225.000000, 27.000000)">\n' + 269 ' <path d="M0.5,8 L15.5,8" id="Shape"></path>\n' + 270 ' <path d="M8,0.5 L8,15.5" id="Shape"></path>\n' + 271 ' </g>\n' + 272 ' </g>\n' + 273 ' </g>\n' + 274 ' </g>\n' + 275 ' </g>\n' + 276 '</svg></span>'); 277 var min = input.data('min'); 278 var max = input.data('max'); 279 t.find('span').on("click", function () { 280 var $button = $(this); 281 numberButtonFunc($button); 282 }); 283 t.find('span').on("mousedown touchstart", function () { 284 var $button = $(this); 285 timeOut = setInterval(function () { 286 numberButtonFunc($button); 287 }, 150); 288 }).bind('mouseup mouseleave touchend', function () { 289 clearInterval(timeOut); 290 }); 291 function numberButtonFunc($button) { 292 var oldValue = $button.parent().find("input").val(); 293 var container = $button.closest('.form-guest-search'); 294 var total = 0; 295 $('input[type="text"]', container).each(function () { 296 total += parseInt($(this).val()); 297 }); 298 var newVal = oldValue; 299 if ($button.hasClass('next')) { 300 if (total < max) { 301 if (oldValue < max) { 302 newVal = parseFloat(oldValue) + 1; 303 } else { 304 newVal = max; 305 } 306 } 307 } else { 308 if (oldValue > min) { 309 newVal = parseFloat(oldValue) - 1; 310 } else { 311 newVal = min; 312 } 313 } 314 $button.parent().find("input").val(newVal).trigger('change'); 315 $('input[name="' + $button.parent().find("input").attr('name') + '"]', '.search-form').trigger('change'); 316 $('input[name="' + $button.parent().find("input").attr('name') + '"]', '.form-check-availability-hotel').trigger('change'); 317 $('input[name="' + $button.parent().find("input").attr('name') + '"]', '.single-room-form').trigger('change'); 318 if (window.matchMedia('(max-width: 767px)').matches) { 319 $('#dropdown-1 label', $button.closest('.field-guest')).hide(); 320 $('#dropdown-1 .render', $button.closest('.field-guest')).show(); 321 } 322 } 323 }); 324 $('.btn-close-guest-form').on('click', function () { 325 $('.field-guest .dropdown-menu').slideUp(50); 326 }); 327 var body = $('body'); 328 body.click(function (ev) { 329 if ($(ev.target).closest('.form-extra-field').length == 0) { 330 $('.form-extra-field .dropdown-menu').slideUp(50); 331 $('.form-extra-field .arrow').removeClass('fa-angle-up').addClass('fa-angle-down'); 332 } 333 }); 334 $('.form-date-search', body).each(function () { 335 var parent = $(this), 336 date_wrapper = $('.date-wrapper', parent),
337 check_in_input = $('.check-in-input', parent), 338 check_out_input = $('.check-out-input', parent), 339 check_in_out = $('.check-in-out', parent), 340 check_in_render = $('.check-in-render', parent), 341 check_out_render = $('.check-out-render', parent); 342 var timepicker = parent.data('timepicker'); 343 if(typeof timepicker == 'undefined' || timepicker == ''){ 344 timepicker = false; 345 }else{ 346 timepicker =true; 347 } 348 var options = { 349 singleDatePicker: false, 350 autoApply: true, 351 drops: 'down', 352 disabledPast: true, 353 dateFormat: 'DD/MM/YYYY', 354 customClass: '', 355 widthSingle: 500, 356 onlyShowCurrentMonth: true, 357 timePicker: timepicker, 358 }; 359 if (typeof locale_daterangepicker == 'object') { 360 options.locale = locale_daterangepicker; 361 } 362 check_in_out.daterangepicker(options, 363 function (start, end, label) { 364 check_in_input.val(start.format('YYYY-MM-DD')); 365 $('#tp_hotel .form-date-search .check-in-input').val(start.format('YYYY-MM-DD')); 366 check_in_render.attr('style','font-size:16px;display:inline-block;').html(start.format(parent.data('format'))); 367 check_out_input.val(end.format('YYYY-MM-DD')); 368 $('#tp_hotel .form-date-search .check-out-input').val(end.format('YYYY-MM-DD')); 369 check_out_render.attr('style','font-size:16px;display:inline-block;').html(end.format(parent.data('format'))); 370 if(timepicker){ 371 check_in_input.val(start.format(parent.data('date-format'))); 372 $('.check-in-input-time', parent).val(start.format(parent.data('time-format'))); 373 check_out_input.val(end.format(parent.data('date-format'))); 374 $('.check-out-input-time', parent).val(end.format(parent.data('time-format'))); 375 $('.check-out-input-time', parent).val(end.format(parent.data('time-format'))); 376 } 377 check_in_out.trigger('daterangepicker_change', [start, end]); 378 if (window.matchMedia('(max-width: 767px)').matches) { 379 $('label', parent).hide(); 380 $('.render', parent).show(); 381 $('.check-in-wrapper span', parent).show(); 382 } 383 }); 384 date_wrapper.click(function (e) { 385 check_in_out.trigger('click'); 386 }); 387 388 check_in_out.on('apply.daterangepicker', function(ev, picker) { 389 console.log(picker.startDate.format('YYYY-MM-DD')); 390 console.log(picker.endDate.format('YYYY-MM-DD')); 391 }); 392 }); 393 394 // Sample Hero Slider 395 if (jQuery().flexslider) { 396 //flexslider ticker 397 $('.flexslider-ticker').each(function() { 398 var tickerSettings = { 399 animation: "slide", 400 animationLoop: false, 401 selector: ".items > .item", 402 move: 1, 403 controlNav: false, 404 slideshow: true, 405 direction: 'vertical' 406 }; 407 $(this).flexslider(tickerSettings); 408 }); 409 // flexsliders 410 $('.flexslider#main-slider').each(function() { 411 var sliderSettings = { 412 animation: $(this).attr('data-transition'), 413 selector: ".slides > .slide", 414 controlNav: false, 415 smoothHeight: true, 416 prevText: "", 417 nextText: "", 418 sync: $(this).data('slidernav') || '', 419 start: function(slider) { 420 if (slider.find('[data-slide-bg-stretch=true]').length > 0) { 421 slider.find('[data-slide-bg-stretch=true]').each(function() { 422 if ($(this).data('slide-bg')) { 423 $(this).backstretch($(this).data('slide-bg')); 424 // $(this).data('slide-bg'); 425 } 426 }); 427 } 428 } 429 }; 430 431 $('html').addClass('has-flexslider'); 432 $(this).flexslider(sliderSettings); 433 }); 434 $(window).delay(1000).trigger('resize'); //make sure height is right load assets loaded 435} 436 // EOF Sample Hero Slider 437});
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.