1// NA pop up 2$(document).ready(function() { 3 $(window).scroll(function () { 4 var userScroll = $(window).scrollTop() == ($(document).height() - $(window).height()); 5 if (userScroll) { 6 $(".popup__holder").css({'bottom': '20px'}); 7 } else { 8 $(".popup__holder").css({'bottom': '0'}); 9 } 10 }); 11//hide when click close 12 $(".popup__item").each(function (index) { 13 $(this).find('.popup__close').on('click', function () { 14 var containerH = $(this).parent().prev().outerHeight() + $(this).parent().next().outerHeight(); 15 16 if ($(this).parent().is(':first-child')) { 17 18 placeCards(); 19 } else { 20 var fItemH = $(this).parent().prev().outerHeight(); 21 var sItemH = $(this).parent().next().outerHeight(); 22 var containerH = fItemH + sItemH + 30; 23 $(".popup__holder").animate({'height': containerH}); 24 $(this).parent().next().removeClass('animOut').addClass('animIn').animate({'top': fItemH + 15}); 25 26 $(this).parent().removeClass('animIn').addClass('animOut').fadeOut(800, function () { 27 $(this).remove(); 28 }); 29 } 30 }); 31 }); 32 33 function placeCardsInit() { 34 var fItemH = $('.popup__item:nth-child(1)').outerHeight(); 35 var sItemH = $('.popup__item:nth-child(2)').outerHeight(); 36 var containerH = fItemH + sItemH + 30; 37 $(".popup__holder").css('height', containerH); 38 $('.popup__item:nth-child(1)').addClass('animIn').css({ 39 'top': '0' 40 }); 41 $('.popup__item:nth-child(2)').addClass('animIn').css({ 42 'top': fItemH + 15 43 }); 44 } 45 46 function placeCards() { 47 48 49 if ($('.popup__item').length > 2) { 50 var fItemH = $('.popup__item:nth-child(2)').outerHeight(); 51 var sItemH = $('.popup__item:nth-child(3)').outerHeight(); 52 var containerH = fItemH + sItemH + 30; 53 $(".popup__holder").animate({'height': containerH}); 54 55 $(".popup__item:nth-child(1)").removeClass('animIn').addClass('animOut').fadeOut(800, function () { 56 $(this).remove(); 57 }); 58 $('.popup__item:nth-child(2)').animate({'top': '0'}); 59 $('.popup__item:nth-child(3)').addClass('animIn').animate({'top': fItemH + 15}); 60 61 } else { 62 $(".popup__item:nth-child(1)").removeClass('animIn').addClass('animOut').fadeOut(800, function () { 63 $(this).remove(); 64 }); 65 } 66 } 67 68 placeCardsInit(); 69 //change popup each6s 70 var repeatPopUp = 0; 71 var popUpCicle = setInterval(function () { 72 repeatPopUp += 1; 73 if (repeatPopUp === 5) { 74 clearInterval(popUpCicle); 75 } 76 placeCards(); 77 }, 6000); 78 79}); 80
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.