Template:Mexico-UNAM-CINVESTAV-HEADER

From 2010.igem.org

(Difference between revisions)
Line 3: Line 3:
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function(){
$(document).ready(function(){
-
 
+
$("ul.subnav").parent().append("<span></span>");  
-
$("ul.subnav").parent().append("<span></span>");  
+
-
 
+
$("ul.topnav li span").click(function() {  
$("ul.topnav li span").click(function() {  
-
 
$(this).parent().find("ul.subnav").slideDown('fast').show();  
$(this).parent().find("ul.subnav").slideDown('fast').show();  
$(this).parent().hover(function() {
$(this).parent().hover(function() {
Line 15: Line 12:
}).hover(function() {
}).hover(function() {
$(this).addClass("subhover");  
$(this).addClass("subhover");  
-
}, function(){ //On Hover Out
+
}, function(){
$(this).removeClass("subhover");  
$(this).removeClass("subhover");  
-
});
+
});
 +
 
 +
$("body").css("display", "none");
 +
    $("body").fadeIn(2000);
 +
  $("a.transition").click(function(event){
 +
event.preventDefault();
 +
linkLocation = this.href;
 +
$("body").fadeOut(1000, redirectPage);
 +
});
 +
function redirectPage() {
 +
window.location = linkLocation;
 +
}
 +
 
});
});

Revision as of 02:07, 3 September 2010