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: 736px)', 14 xsmall: '(max-width: 480px)' 15 }); 16 17 $(function() { 18 19 var $window = $(window), 20 $body = $('body'), 21 $menu = $('#menu'), 22 $shareMenu = $('#share-menu'), 23 $sidebar = $('#sidebar'), 24 $main = $('#main'); 25 26 // TODO: Fix this, or implement lazy load. 27 // Disable animations/transitions until the page has loaded. 28 // $body.addClass('is-loading'); 29 30 // $window.on('load', function() { 31 // window.setTimeout(function() { 32 // $body.removeClass('is-loading'); 33 // }, 100); 34 // }); 35 36 // Fix: Placeholder polyfill. 37 $('form').placeholder(); 38 39 // Prioritize "important" elements on medium. 40 skel.on('+medium -medium', function() { 41 $.prioritize( 42 '.important\\28 medium\\29', 43 skel.breakpoint('medium').active 44 ); 45 }); 46 47 // IE<=9: Reverse order of main and sidebar. 48 if (skel.vars.IEVersion <= 9) 49 $main.insertAfter($sidebar); 50 51 $menu.appendTo($body); 52 $shareMenu.appendTo($body); 53 54 $menu.panel({ 55 delay: 500, 56 hideOnClick: true, 57 hideOnEscape: true, 58 hideOnSwipe: true, 59 resetScroll: true, 60 resetForms: true, 61 side: 'right', 62 target: $body, 63 visibleClass: 'is-menu-visible' 64 }); 65 66 $shareMenu.panel({ 67 delay: 500, 68 hideOnClick: true, 69 hideOnEscape: true, 70 hideOnSwipe: true, 71 resetScroll: true, 72 resetForms: true, 73 side: 'right', 74 target: $body, 75 visibleClass: 'is-share-visible' 76 }); 77 78 // Menu. 79 /*$menu 80 .appendTo($body) 81 .panel({ 82 delay: 500, 83 hideOnClick: true, 84 hideOnSwipe: true, 85 resetScroll: true, 86 resetForms: true, 87 side: 'right', 88 target: $body, 89 visibleClass: 'is-menu-visible' 90 });*/ 91 92 // Search (header). 93 var $search = $('#search'), 94 $search_input = $search.find('input'); 95 96 $body 97 .on('click', '[href="#search"]', function(event) { 98 99 event.preventDefault(); 100 101 // Not visible? 102 if (!$search.hasClass('visible')) { 103 104 // Reset form. 105 $search[0].reset(); 106 107 // Show. 108 $search.addClass('visible'); 109 110 // Focus input. 111 $search_input.focus(); 112 113 } 114 115 }); 116 117 $search_input 118 .on('keydown', function(event) { 119 120 if (event.keyCode == 27) 121 $search_input.blur(); 122 123 }) 124 .on('blur', function() { 125 window.setTimeout(function() { 126 $search.removeClass('visible'); 127 }, 100); 128 }); 129 130 // Intro. 131 var $intro = $('#intro'); 132 133 // Move to main on <=large, back to sidebar on >large. 134 skel 135 .on('+medium', function() { 136 $intro.prependTo($main); 137 }) 138 .on('-medium', function() { 139 $intro.prependTo($sidebar); 140 }); 141 142 }); 143 144})(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.