1/* 2 This will make sure that the navbar is never taller than the content 3*/ 4function equalize_columns () 5{ 6 var menu_height = (Math.ceil($('#left-column').outerHeight()) > Math.ceil($('#right-column').outerHeight())) ? Math.ceil($('#left-column').outerHeight()) : Math.ceil($('#right-column').outerHeight()); 7 var center_height = Math.ceil($('#center-column').height()); 8 // if (menu_height > center_height) $('#center-column').css('min-height', menu_height + 'px'); 9} 10 11/* 12 Prepare the layout 13*/ 14$(function () { 15 console.log('SP Bootstrap OK!'); 16 // tooltips 17 if (typeof($.tooltipster) == 'object') $('.tip').tooltipster({theme:'tooltipster-sorcerers'}); 18 // layout 19 equalize_columns(); 20 $(window).on('resize', equalize_columns); 21 // top links 22 $(document).on('scroll', function (e) { 23 if ($(document).scrollTop() < 30 && $('.to-the-moon-block').is(':visible')) $('.to-the-moon-block').fadeOut(100); 24 if ($(document).scrollTop() > 30 && $('.to-the-moon-block').is(':hidden')) $('.to-the-moon-block').fadeIn(100); 25 if ($(document).scrollTop() > ($(document).height() - $(window).height() - 30) && $('.back-to-earth-block').is(':visible')) $('.back-to-earth-block').fadeOut(100); 26 if ($(document).scrollTop() < ($(document).height() - $(window).height() - 30) && $('.back-to-earth-block').is(':hidden')) $('.back-to-earth-block').fadeIn(100); 27 }); 28 $(document).trigger('scroll'); 29 30 $('.to-the-moon').on('click', function (e) { 31 console.log("OK"); 32 e.preventDefault(); 33 $('html, body').animate({scrollTop: 0}, 'fast'); 34 return false; 35 }); 36 37 $('.back-to-earth').on('click', function (e) { 38 e.preventDefault(); 39 $('html, body').animate({scrollTop: $(document).height()}, 'fast'); 40 return false; 41 }); 42 43 if ($('.right-column').length > 0) { 44 $('.right-column').imagesLoaded( function() { 45 setTimeout(function () { 46 equalize_columns(); 47 }, 2000); 48 }); 49 } 50 51 52 53 // desktop navigation business 54 var navigating = false; 55 $('nav ul li a').on('click', function (e) { 56 e.stopPropagation(); 57 var $p = $(this).parent(); 58 if ($('ul', $p).length > 0) { 59 if (navigating) return false; 60 e.preventDefault(); 61 navigating = true; 62 if ($p.hasClass('active')) { 63 $p.removeClass('active'); 64 $('ul.subsections', $p).fadeOut(100, function () { 65 navigating = false; 66 }) 67 } else if ($('nav li.active').length > 0) { 68 $('nav li.active ul.subsections').fadeOut(100, function () { 69 $('nav li.active').removeClass('active'); 70 $p.addClass('active'); 71 $('ul.subsections', $p).fadeIn(300, function () { 72 navigating = false; 73 }); 74 }); 75 } else { 76 $p.addClass('active'); 77 $('ul.subsections', $p).fadeIn(300, function () { 78 navigating = false; 79 }); 80 } 81 } 82 }) 83 84 $('body').on('click', function (e) { 85 if ($('nav li.active').length > 0) { 86 $('nav li.active ul.subsections').fadeOut(100, function () { 87 $('nav li.active').removeClass('active'); 88 }); 89 } 90 }) 91});
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.