Difference between revisions of "Team:UMaryland/test"
Sarahjade712 (Talk | contribs) |
Sarahjade712 (Talk | contribs) |
||
Line 207: | Line 207: | ||
</div> | </div> | ||
<script src = "https://2015.igem.org/Team:UMaryland/DROPDOWN.js?action=raw&ctype=text/javascript"> </script> | <script src = "https://2015.igem.org/Team:UMaryland/DROPDOWN.js?action=raw&ctype=text/javascript"> </script> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | |||
+ | (function($) { | ||
+ | |||
+ | skel.breakpoints({ | ||
+ | normal: '(max-width: 1280px)', | ||
+ | narrow: '(max-width: 1080px)', | ||
+ | narrower: '(max-width: 820px)', | ||
+ | mobile: '(max-width: 736px)', | ||
+ | mobilep: '(max-width: 480px)' | ||
+ | }); | ||
+ | |||
+ | $(function() { | ||
+ | |||
+ | var $window = $(window), | ||
+ | $body = $('body'); | ||
+ | |||
+ | // Disable animations/transitions until the page has loaded. | ||
+ | $body.addClass('is-loading'); | ||
+ | |||
+ | $window.on('load', function() { | ||
+ | $body.removeClass('is-loading'); | ||
+ | }); | ||
+ | |||
+ | // Fix: Placeholder polyfill. | ||
+ | $('form').placeholder(); | ||
+ | |||
+ | // Prioritize "important" elements on narrower. | ||
+ | skel.on('+narrower -narrower', function() { | ||
+ | $.prioritize( | ||
+ | '.important\\28 narrower\\29', | ||
+ | skel.breakpoint('narrower').active | ||
+ | ); | ||
+ | }); | ||
+ | |||
+ | // CSS polyfills (IE<9). | ||
+ | if (skel.vars.IEVersion < 9) | ||
+ | $(':last-child').addClass('last-child'); | ||
+ | |||
+ | // Dropdowns. | ||
+ | $('#nav > ul').dropotron({ | ||
+ | mode: 'fade', | ||
+ | speed: 300, | ||
+ | alignment: 'center', | ||
+ | noOpenerFade: true | ||
+ | }); | ||
+ | |||
+ | // Off-Canvas Navigation. | ||
+ | |||
+ | // Navigation Button. | ||
+ | $( | ||
+ | '<div id="navButton">' + | ||
+ | '<a href="#navPanel" class="toggle"></a>' + | ||
+ | '</div>' | ||
+ | ) | ||
+ | .appendTo($body); | ||
+ | |||
+ | // Navigation Panel. | ||
+ | $( | ||
+ | '<div id="navPanel">' + | ||
+ | '<nav>' + | ||
+ | '<a href="index.html" class="link depth-0">Home</a>' + | ||
+ | $('#nav').navList() + | ||
+ | '</nav>' + | ||
+ | '</div>' | ||
+ | ) | ||
+ | .appendTo($body) | ||
+ | .panel({ | ||
+ | delay: 500, | ||
+ | hideOnClick: true, | ||
+ | resetScroll: true, | ||
+ | resetForms: true, | ||
+ | side: 'top', | ||
+ | target: $body, | ||
+ | visibleClass: 'navPanel-visible' | ||
+ | }); | ||
+ | |||
+ | // Fix: Remove navPanel transitions on WP<10 (poor/buggy performance). | ||
+ | if (skel.vars.os == 'wp' && skel.vars.osVersion < 10) | ||
+ | $('#navButton, #navPanel, #page-wrapper') | ||
+ | .css('transition', 'none'); | ||
+ | |||
+ | }); | ||
+ | |||
+ | })(jQuery); | ||
+ | |||
+ | </script> | ||
+ | |||
</body> | </body> | ||
</html> | </html> |
Revision as of 00:05, 2 September 2015