Template:Team:Amsterdam/scripts

From 2012.igem.org

(Difference between revisions)
 
(59 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<!-- 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"
 
-
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
 
<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 25:
     });
     });
</script>
</script>
-
 
<!-- 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'>
<script type='text/javascript'>
-
function mainmenu(){
+
function navmenu(){
-
$(" #nav ul ").css({display: "none"}); // Opera Fix
+
$("#navmenu ul ul").css({display: "none", height:'auto'}); // Opera Fix
-
$(" #nav li").hover(function(){
+
-
$(this).find('ul:first').css({visibility: "visible"}).show(400);
+
-
},function(){
+
-
$(this).find('ul:first').css({visibility: "hidden"});
+
-
});
+
-
$(" #nav li li").hover(function(){
+
-
$(this).find('a').css({visibility: "visible", display: "none"}).show(400);
+
-
},function(){
+
-
$(this).find('a').css({visibility: "hidden"});
+
-
});
+
-
}
+
-
function mainmenu2(){
+
$("#navmenu ul ul.expanded").css({display: "block", height:'show'}); // Expand selected elements
-
$(" #nav li").hover(function(){
+
 
-
$(this).find('ul:first').css({visibility: "visible", display: "none"}).show(400);
+
$("#navmenu ul > li:has(ul) > a").toggle(
-
},function(){
+
function(){$(this).siblings('ul').animate({display:'block', height:'show'},{queue:true, duration:400});},
-
$(this).find('ul:first').css({visibility: "hidden", display: "block"});
+
function(){$(this).siblings('ul').animate({height:'hide', display:'none'},{queue:true, duration:400});}
-
});
+
);
-
}
+
};
   
   
-
$(document).ready(function(){
+
$(document).ready(function(){
-
mainmenu();
+
navmenu();
});
});
</script>
</script>
-
<!-- Facebook script -->
+
<!-- Sticky Sidebar -->
-
<script type='text/javascript'>
+
<script type="text/javascript">
-
  window.fbAsyncInit = function() {
+
$(window).scroll(function () {
-
    FB.init({
+
var winPos = $(window).scrollTop();
-
      appId      : 'YOUR_APP_ID', // App ID
+
if (winPos > 234) {
-
      channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
+
$("#sidebar-area").css({position:'fixed', top: 0});
-
      status    : true, // check login status
+
} else {
-
      cookie    : true, // enable cookies to allow the server to access the session
+
$("#sidebar-area").css({position:'relative'});
-
      xfbml      : true  // parse XFBML
+
}
-
    });
+
});
 +
</script>
-
    // Additional initialization code here
+
<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">
-
  // Load the SDK Asynchronously
+
    MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)'],['<math>','</math>']]}});
-
  (function(d){
+
-
    var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
+
-
    if (d.getElementById(id)) {return;}
+
-
    js = d.createElement('script'); js.id = id; js.async = true;
+
-
    js.src = "//connect.facebook.net/en_US/all.js";
+
-
    ref.parentNode.insertBefore(js, ref);
+
-
  }(document));
+
</script>
</script>
 +
 +
 +
 +
</html>
</html>

Latest revision as of 03:51, 27 September 2012