$(function(){
var i = $("#right").css("left");
$("#dianji").click(function(){
$("#leftmenu").animate({"z-index":"999"}, 1300);
$("#right").animate({left:"3rem"}, 1500);
$("#dianji").animate({left:"3.18rem"}, 1500);
$("#logo").animate({left:"4.7rem"}, 1500);
$("body").css("overflow","hidden");
// $(".banner").animate({left:"3.25rem"}, 1500);
function change_pic(){
var imgObj = document.getElementById("dianji");
if( imgObj.getAttribute("src",0)=="images/Menu.png"){
imgObj.src="images/Poor.png";
}else{
$("#leftmenu").stop().animate({"z-index":"0"}, 100);
$("#right").stop().animate({"z-index":"999"}, 300);
$("#dianji").stop().animate({left:"0.2rem"}, 1500);
$("#right").stop().animate({left:"-0rem"}, 1500);
$("#logo").stop().animate({left:"1.7rem"}, 1500);
$("body").css("overflow","");
// $(".banner").stop().animate({left:"0"}, 1500);
imgObj.src="images/Menu.png";
}
}
change_pic();
});
});
转载于:https://www.cnblogs.com/HanJie0824/p/6878998.html