Template:Team:Amsterdam/scripts
From 2012.igem.org
(Difference between revisions)
(14 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
<!-- Methode of injecting stuff into the header before page load! :D thank god that mediawiki includes jquery standard ;) --> | <!-- Methode of injecting stuff into the header before page load! :D thank god that mediawiki includes jquery standard ;) --> | ||
<script type='text/javascript'> | <script type='text/javascript'> | ||
- | $(document).ready( function() { | + | //$(document).ready( function() { |
//$('head > style[media="screen, projection"]').remove(); | //$('head > style[media="screen, projection"]').remove(); | ||
//$('head > script[src="/forum/forum_scripts.js"]').remove(); | //$('head > script[src="/forum/forum_scripts.js"]').remove(); | ||
//$('head > link[href="/wiki/skins/common/commonPrint.css?270"]').remove(); | //$('head > link[href="/wiki/skins/common/commonPrint.css?270"]').remove(); | ||
- | $("head").append("<link>"); | + | //$("head").append("<link>"); |
- | css = $("head > :last"); | + | //css = $("head > :last"); |
//css = $("head").children(":last"); | //css = $("head").children(":last"); | ||
- | css.attr({ | + | //css.attr({ |
- | rel: "stylesheet", | + | //rel: "stylesheet", |
- | type: "text/css", | + | //type: "text/css", |
- | href: "/testcss.css" | + | //href: "/testcss.css" |
- | }); | + | //}); |
- | }); | + | //}); |
</script> | </script> | ||
Line 27: | Line 27: | ||
<!-- JQuery menu animations --> | <!-- JQuery menu animations --> | ||
- | <script type='text/javascript' src ='http://cherne.net/brian/resources/jquery.hoverIntent.minified.js'></script> | + | <!--<script type='text/javascript' src ='http://cherne.net/brian/resources/jquery.hoverIntent.minified.js'></script>--> |
<script type='text/javascript'> | <script type='text/javascript'> | ||
function navmenu(){ | function navmenu(){ | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
$("#navmenu ul ul").css({display: "none", height:'auto'}); // Opera Fix | $("#navmenu ul ul").css({display: "none", height:'auto'}); // Opera Fix | ||
- | $("#navmenu ul > li:has(ul) a").toggle( | + | $("#navmenu ul ul.expanded").css({display: "block", height:'show'}); // Expand selected elements |
+ | |||
+ | $("#navmenu ul > li:has(ul) > a").toggle( | ||
function(){$(this).siblings('ul').animate({display:'block', height:'show'},{queue:true, duration:400});}, | function(){$(this).siblings('ul').animate({display:'block', height:'show'},{queue:true, duration:400});}, | ||
function(){$(this).siblings('ul').animate({height:'hide', display:'none'},{queue:true, duration:400});} | function(){$(this).siblings('ul').animate({height:'hide', display:'none'},{queue:true, duration:400});} | ||
Line 55: | Line 41: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
- | + | navmenu(); | |
}); | }); | ||
</script> | </script> | ||
- | <!-- | + | <!-- Sticky Sidebar --> |
- | <script type= | + | <script type="text/javascript"> |
- | <script type= | + | $(window).scroll(function () { |
+ | var winPos = $(window).scrollTop(); | ||
+ | if (winPos > 234) { | ||
+ | $("#sidebar-area").css({position:'fixed', top: 0}); | ||
+ | } else { | ||
+ | $("#sidebar-area").css({position:'relative'}); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> | ||
+ | </script> | ||
+ | <script type="text/x-mathjax-config"> | ||
+ | MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)'],['<math>','</math>']]}}); | ||
+ | </script> | ||
+ | |||
+ | |||
+ | |||
</html> | </html> |
Latest revision as of 03:51, 27 September 2012