$("#sec").css("left","-200px").animate({"left":"0px"},500).show();
});
$("#btn2").unbind().click(function(){
$("#sec").hide();
$("#first").css("left","200px").animate({"left":"0px"},500).show();
});
$("#btn3").unbind().click(function(){
$("#first").hide();
$("#sec").css("top","200px").animate({"top":"0px"},500).show();
});
$("#btn4").unbind().click(function(){
$("#sec").hide();
$("#first").css("top","-200px").animate({"top":"0px"},500).show();
});
});
script>
第一页
第一页
第一页
第一页
第一页
第二页
第二页
第二页
第二页
第二页
特别要注意:代码中的position:absolute;一定要加上,否则不会出现效果。
希望本文所述对大家的jQuery程序设计有所帮助。