jquery谷歌调试
addClass()
after()
append()
ajaxStart()
find()
andSelf()
animate()
$(document).ready(function () {
$(".new_cont ul li:first a").hover(function () {
$(".newimg img").animate({width:"80%",height:"80%"},1000);
});
}
当鼠标停在指定<a>上时:左边的框慢慢变小
<div class="mydemo width mar">
<button id="left">«</button> <button id="right">»</button>
<div class="block"></div>
</div> //html代码
js代码
<script type="text/javascript">
$(".mydemo #left").click(function () {
$(this).animate({marginLeft:'+50px'},"slow");
});
$(".mydemo #right").click(function () {
$(this).animate({ marginLeft: '-50px' }, "slow");
});
</script>
效果:
点击左右按钮后: