1var $window = $(window), 2 lastScrollTop = 0, 3 animationEnd = true; 4 5function onScroll(e) { 6 7 var top = $window.scrollTop(); 8 9 // if (!lastElemOnScreen($('.block-banner').last()[0])) { 10// $('.block-footer').slideUp(100, false, function () { 11// animationEnd = true; 12// }); 13 14 // } else { 15 if (animationEnd) { 16 17 if ($('.block-footer').length > 0){ 18 /* if (lastScrollTop > top) { 19 20 animationEnd = false; 21 $('.block-footer__inner').slideUp(200, false, function () { 22 animationEnd = true; 23 }); 24 } else if (lastScrollTop < top) { 25 26 animationEnd = false; 27 $('.block-footer__inner').slideDown(200, false, function () { 28 animationEnd = true; 29 }); 30 }*/ 31 if($('.block-footer__inner').is(':visible')){ 32 animationEnd = false; 33 $('.block-footer__inner').slideUp(200, false, function () { 34 animationEnd = true; 35 $('.wrapper__inner').css('padding-bottom', '20px'); 36 $('.block-footer__arrow').removeClass('block-footer__arrow_show'); 37 }); 38 } 39 } 40 } 41 //} 42 lastScrollTop = top; 43} 44 45$(document).ready(function () { 46 $window.on('scroll', onScroll); 47 48 $('.block-footer__arrow').click(function () { 49 if($('.block-footer__inner').is(':visible')) { 50 $('.block-footer__inner').slideUp(); 51 $(this).removeClass('block-footer__arrow_show'); 52 $('.wrapper__inner').css('padding-bottom', '20px'); 53 } else { 54 $('.block-footer__inner').slideDown(); 55 $(this).addClass('block-footer__arrow_show'); 56 $('.wrapper__inner').css('padding-bottom', '300px'); 57 } 58 return false; 59 }); 60 61 $('.block-footer__input') 62 .focus(function() { 63 if($(this).val() == 'ÐÐ°Ñ E-mail') $(this).val(''); 64 }) 65 .blur(function() { 66 if($(this).val() == '') $(this).val('ÐÐ°Ñ E-mail'); 67 }); 68}); 69 70function lastElemOnScreen(element) { 71 try { 72 var scroll_pos = $(window).scrollTop(); 73 var window_height = $(window).height(); 74 var el_top = $(element).offset().top; 75 var el_height = $(element).height(); 76 var el_bottom = el_top + el_height; 77 if (scroll_pos + window_height - el_bottom > 0) { 78 return true; 79 } else { 80 return false; 81 } 82 } catch (e) { 83 } 84 85}
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.