1/* 2 Future Imperfect by HTML5 UP 3 html5up.net | @n33co 4 Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5*/ 6 7(function($) { 8 9 skel.breakpoints({ 10 xlarge: '(max-width: 1680px)', 11 large: '(max-width: 1280px)', 12 medium: '(max-width: 980px)', 13 small: '(max-width: 767px)', 14 xsmall: '(max-width: 480px)' 15 }); 16 17 $(function() { 18 19 var $window = $(window), 20 $body = $('body'), 21 $menu= $('#menu, #mobi-menu'), 22 $sidebar = $('#sidebar'), 23 $main = $('#main'); 24 25 // Disable animations/transitions until the page has loaded. 26 $body.addClass('is-loading'); 27 28 $window.on('load', function() { 29 window.setTimeout(function() { 30 $body.removeClass('is-loading'); 31 }, 100); 32 }); 33 34 // Fix: Placeholder polyfill. 35 $('form').placeholder(); 36 37 // Prioritize "important" elements on medium. 38 skel.on('+medium -medium', function() { 39 $.prioritize( 40 '.important\\28 medium\\29', 41 skel.breakpoint('medium').active 42 ); 43 }); 44 45 // IE<=9: Reverse order of main and sidebar. 46 if (skel.vars.IEVersion <= 9) 47 $main.insertAfter($sidebar); 48 49 // Menu. 50 $menu 51 .appendTo($body) 52 .panel({ 53 delay: 500, 54 hideOnClick: true, 55 hideOnSwipe: true, 56 resetScroll: true, 57 resetForms: true, 58 side: 'left', 59 target: $body, 60 visibleClass: 'is-menu-visible' 61 }); 62 63 // Search (header). 64 var $search = $('#search'), 65 $search_input = $search.find('input'); 66 67 $body 68 .on('click', '[href="#search"]', function(event) { 69 70 event.preventDefault(); 71 72 // Not visible? 73 if (!$search.hasClass('visible')) { 74 75 // Reset form. 76 $search[0].reset(); 77 78 // Show. 79 $search.addClass('visible'); 80 81 // Focus input. 82 $search_input.focus(); 83 84 } 85 86 }); 87 88 $search_input 89 .on('keydown', function(event) { 90 91 if (event.keyCode == 27) 92 $search_input.blur(); 93 94 }) 95 .on('blur', function() { 96 window.setTimeout(function() { 97 $search.removeClass('visible'); 98 }, 100); 99 }); 100 101 // Intro. 102 var $intro = $('#intro'); 103 104 // Move to main on <=large, back to sidebar on >large. 105 skel 106 .on('+large', function() { 107 $intro.prependTo($main); 108 }) 109 .on('-large', function() { 110 $intro.prependTo($sidebar); 111 }); 112 113 }); 114 115})(jQuery);
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.