Team:Valencia/navbar

From 2010.igem.org

(Difference between revisions)
Line 4: Line 4:
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
-
 
+
$("ul#topnav li").hover(function() {  
-
$("ul#topnav li").hover(function() { //Hover over event on list item
+
$(this).css({ 'background' : '#1376c9 url(https://static.igem.org/mediawiki/2010/2/29/Groningen_topnav_active.gif) repeat-x'});  
-
$(this).css({ 'background' : '#1376c9 url(topnav_active.gif) repeat-x'}); //Add background color and image on hovered list item
+
$(this).find("span").show();  
-
$(this).find("span").show(); //Show the subnav
+
} , function() { //on hover out...
-
} , function() { //on hover out...
+
$(this).css({ 'background' : 'none'});  
-
$(this).css({ 'background' : 'none'}); //Ditch the background
+
$(this).find("span").hide();  
-
$(this).find("span").hide(); //Hide the subnav
+
});
-
});
+
-
 
+
});
});
</script>
</script>

Revision as of 11:13, 23 October 2010