Template:Team:Amsterdam/ernst/scripts

From 2012.igem.org

(Difference between revisions)
 
(40 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'>
<script type='text/javascript'>
Line 26: 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",display: "none"}).show(400);
+
-
},function(){
+
-
$(this).find('ul:first').css({visibility: "hidden"});
+
-
});
+
-
}
+
-
 
+
-
function submenu(){
+
-
$(" #submenu ul ul ").css({display: "none"}); // Opera Fix
+
-
$(" #submenu ul li").hover(function(){
+
-
$(this).find('ul:first').show(400);
+
-
},function(){
+
-
$(this).find('ul:first').hide(400);
+
-
});
+
-
}
+
-
 
+
-
 
+
-
function submenu2(){
+
-
 
+
-
$(" #submenu ul li").ready(function(){
+
-
alert($(this).height());
+
-
});
+
-
$(" #submenu ul ul ").css({display: "none", height:'auto'}); // Opera Fix
+
var config = {   
 +
    over: function(){
 +
$(this).find('ul:first').animate({display:'block', height:'show'},{queue:true, duration:400});
 +
},   
 +
    timeout: 2500, // number = milliseconds delay before onMouseOut   
 +
    out: function(){
 +
$(this).find('ul:first').animate({height:'hide', display:'none'},{queue:true, duration:400});
 +
}
 +
};
-
$(" #submenu ul li").hover(function(){
+
$(" #navmenu ul li").hoverIntent(config);
-
+
-
$(this).find('ul:first').stop().animate({display:'block', height:'show'},{queue:true, duration:400});
+
-
},function(){
+
-
$(this).find('ul:first').stop().animate({height:'hide', display:'none'},{queue:true, duration:400});
+
-
});
+
-
}
+
-
 
+
-
function submenu3(){
+
-
$(" #submenu ul ul ").css({display: "none"}); // Opera Fix
+
-
$(" #submenu ul li").hover(function(){
+
-
$(this).find('ul:first').slideDown(400);
+
-
},function(){
+
-
$(this).find('ul:first').slideUp(400);
+
-
});
+
}
}
   
   
-
$(document).ready(function(){
+
$(document).ready(function(){
-
mainmenu();
+
navmenu();
-
//submenu();
+
-
submenu2();
+
-
//submenu3();
+
});
});
-
 
-
 
</script>
</script>
-
<!-- Facebook script -->
+
<!-- Facebook RSS Feed Processor -->
-
<script type='text/javascript'>
+
<script type='text/javascript' src='http://www.zazar.net/developers/jquery/zrssfeed/jquery.zrssfeed.min.js'></script>
-
  window.fbAsyncInit = function() {
+
<script type='text/javascript' src='scripts/fb-feed-collector.js?action=raw'></script>
-
    FB.init({
+
-
      appId      : 'YOUR_APP_ID', // App ID
+
-
      channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
+
-
      status    : true, // check login status
+
-
      cookie    : true, // enable cookies to allow the server to access the session
+
-
      xfbml      : true  // parse XFBML
+
-
    });
+
-
 
+
-
    // Additional initialization code here
+
-
  };
+
-
 
+
-
  // Load the SDK Asynchronously
+
-
  (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>
+
</html>
</html>

Latest revision as of 13:05, 12 September 2012