Your question is not very clear...
The following code works... Maybe this helps?
<html>
<head>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
<style type="text/css">
#tabMenu li {display:block;float:left;background-color:green;}
#tabMenu li a {color:white;}
#tabMenu li.active {background-color:blue;}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#tabMenu > li').click(function() {
if (!$(this).hasClass('active')) {
$('#tabMenu > li').removeClass('active');
$(this).addClass('active');
}
});
});
</script>
</head>
<body>
<div id="menu">
<ul id="tabMenu">
<li><a href="#">MenuItem</a></li>
<li><a href="#">MenuItem</a></li>
<li><a href="#">MenuItem</a></li>
</ul>
</div>
</body>
</html>
Ropstah
2009-06-02 10:29:35