<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../style/products_0.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/tab1.js"></script>
</head>
<body>
<div class="menubox_0">
<div class="menubox">
<ul>
<li><a href="#" class="tab hover" title="contents_1">Specifications</a></li>
<li><a href="#" class="tab" title="contents_2">System Requirement </a></li>
<li><a href="#" class="tab" title="contents_3">Images</a></li>
</ul>
</div>
<div id="contents_1" class="contents_0">
<p> This DRM Converter is capable of converting audio and video file ... </p>
</div>
<div id="contents_2" class="contents_0">
<p> This DRM Converter is capable of converting audio and video file ... </p>
</div>
<div id="contents_3" class="contents_0">
<p> This DRM Converter is capable of converting audio and video file ... </p>
</div>
</div>
</body>
_____________________________________________________________
<! --JS程序:tab1.js -- >
$(document).ready(function(){
// When a link is clicked
$("a.tab").click(function () {
// switch all tabs off
$(".hover").removeClass("hover");
// switch this tab on
$(this).addClass("hover");
// slide all content up
$(".contents_0").slideUp();
// slide this content up
var content_show = $(this).attr("title");
$("#"+content_show).slideDown();
});
});
___________________________________________________________
<! -- CSS代码:products_0.css -->
.menubox_0{width:100%; margin-top:20px;}
.menubox { width:100%; height:28px; line-height:28px;}
.menubox ul { margin:0;}
.menubox li { float:left; display:block; cursor:pointer; width:135px; text-align:center; height:28px; line-height:28px; margin-left:1px; list-style:none; }
.menubox li a {background:url(../image/tabb.png) no-repeat; width:135px; display:block;}
.menubox li a.hover { padding:0; background: url(../image/tab_hover.png) no-repeat; height:28px; line-height:28px; color:#fff; margin-left:1px; _margin-left:0; }