【www.gdgbn.com--jquery】




<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

jquery框架的后台菜单切换效果

<script language="网页特效">
var t = true;
var nowi = 0;
$(function(){
$(".menu").click(function(){
var gh = $(this).next("ul");
var hj = $(".mu");
if (t)
{
gh.slidedown("slow");
t = false;
nowi = gh.parent().index();
} else {
if (gh.parent().index() != nowi)
{
for (var i=0; i {
if(hj.eq(i).css("display") == "block"){
hj.eq(i).slideup("slow");
}
}
gh.slidedown("slow");
nowi = gh.parent().index();
}
}
});
});
</script>