Dashu: Navi hilfe

Beitrag lesen

ok ^^

also da mein english nicht grad gut ist hoffe ich hab alles richtig verstanden ^^

also ich brauche eine jquery.js datei. und in der soll dann das drin stehn:

  
  
jQuery(document).ready(function() {  
	  
$('#navigation').css('border', '5px solid red');  
  
});  
  

und dann eine html datei in der das drin stehn soll:

  
  
<html>  
<head>  
<script type="text/javascript" src="jquery.js"></script>  
<link rel="stylesheet" href="style.css" type="text/css">  
</head>  
  
<body>  
  
<script type="text/javascript">  
function navigation() {  
  // Selektiere alle li-Elemente welche direkte Nachfahren eines ul-Elements innerhalb eines Elements mit der id navigation sind  
  // wende darauf das Event "hover" an  
  $('#navigation ul>li').hover(  
    // Ast für onouseover  
    function() {  
      // füge die Klasse hover hinzu  
      $(this).addClass("hover");  
    },  
    // selbriges, nur für onouseout  
    function() {  
      $(this).removeClass("hover);  
    }  
  );  
}  
</script>  
  
  
<div id="navigation">  
  <ul>  
        <li><a class="navi2" href="#">Nummer I  </ a></li>  
        <li><a class="navi2" href="#">Nummer II </ a></li>  
  </ul>  
</div>  
  
</body>  

ist das so richtig ?