1// script for showing a text message "click here to see more hotels in XXX" at the bottom 2// of the screen when: 3// 1. for medium and large screens: when the "hotels" section is reached 4// 2. for small screens: when the accordion item "hotels" is opened 5// * for small screens: add an X in the top right corner for closing the ad 6 7var hotelsAdClosed; 8var hotelsSectionTop; 9var hotelsSectionBottom; 10 11$('#hotels-ad-close').click(function () { 12 $('.hotels-ad-fixed-bottom-bg').fadeOut('slow'); 13 hotelsAdClosed = "true"; 14 15 //small screens - on close move arrow down 16 if ($(window).width() < 737){ 17 document.getElementById('arrow_top_big').style.bottom = "35px"; 18 } 19 }); 20 21 22$(window).on('load', function(){ 23 //hotelsSectionTop = $('#hotels').offset().top - $('#hotels').height() + 300; 24 //console.log('$(#hotels).height(): ',$('#hotels').height()); 25 hotelsSectionTop = $('#hotels').offset().top - 100; 26 //console.log('hotelsSectionTop: ',hotelsSectionTop); 27 //hotelsSectionBottom = $('#hotels').offset().top + 200; 28 hotelsSectionBottom = $('#hotels').offset().top + $('#hotels').height() - 200; 29 //console.log('hotelsSectionBottom: ',hotelsSectionBottom); 30}); 31 32$(document).ready(function() { 33 //medium & large screens 34 if ($(window).width() > 736){ 35 $(window).scroll( function(){ 36 if($(window).scrollTop() > hotelsSectionTop && $(window).scrollTop() < hotelsSectionBottom && hotelsAdClosed !== "true"){ 37 $(".hotels-ad-fixed-bottom-bg").fadeIn('slow'); 38 document.getElementById('arrow_top_big').style.bottom = "100px"; 39 } else { 40 $('.hotels-ad-fixed-bottom-bg').fadeOut('slow'); 41 document.getElementById('arrow_top_big').style.bottom = "35px"; 42 } 43 }); 44 } else { //small screens 45 $('#hotelsAccordion').click(function () { 46 if ( $(".hotels-ad-fixed-bottom-bg").css('display') == 'none' && hotelsAdClosed !== "true" ) { 47 $(".hotels-ad-fixed-bottom-bg").delay(2000).fadeIn('slow'); 48 document.getElementById('arrow_top_big').style.bottom = "100px"; 49 } else { 50 $(".hotels-ad-fixed-bottom-bg").fadeOut('slow'); 51 document.getElementById('arrow_top_big').style.bottom = "35px"; 52 } 53 54 }); 55 } 56});
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.