<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>TAb</title>
</head>
<body>
<div class="tab">
<ul class="tab-hd">
<li class="selected"></li>
<li></li>
<li></li>
</ul>
<div class="tab-bd tab-show"></div>
<div></div>
<div></div>
</div>
<script src="scripts/jquery-1.7.1.min.js" type="text/javascript" ></script>
<script type="text/javascript">
$(function(){
$(".tab-hd").find("li").mouseover(function(e) {
if (e.target == this) {
var tabs = $(this).parent().children("li");
var panels = $(this).parent().parent().children("div");
var index = $.inArray(this, tabs);
if (panels.eq(index)[0]) {
tabs.removeClass("selected")
.eq(index).addClass("selected");
panels.removeClass("tab-show")
.eq(index).addClass("tab-show");
}
}
});
});
</script>
</body>
</html>