各位大神帮帮忙
我点击时里面内容不改变,还是一开始的内容,一下我根据老师写的代码
<script type="text/javascript">
$(function(){
$("#menulist").on("click","a",function(){
if($(this).hasClass("btn-active")){
$("#expandZone #closeBtn").click;
return false;
}
var curIndex = $(this).index(),mlValue= "-"+curIndex*100 +"%";
if($("#expandZone").hasClass("active")){
$("#expandZone .expdiv").animate({maginLeft:mlValue});
}
else{
$("#expandZone .expdiv").css({marginLeft :mlValue});
$("#expandZone").animate({height:"130px"}).addClass("active");
}
$(this).addClass("btn-active").siblings().removeClass("btn-active");
return false;
});
$("#expandZone #closeBtn").on("click",function(){
$("#expandZone").animate({height:"0px"},function(){
$(this).removeClass("active");
$("#menulist .btn-active").removeClass("btn-active");
});
return false;
});
});
</script>