我帶着另一個問題jQuery的:
所以我有這樣的代碼:
jQuery的:點擊放大和移動
$(document).ready(function(){
$(this).click(function(){
$("#block1").animate({width:7em,height:7em});
$("#block2").animate({width:7em,height:7em});
$("#block3").animate({width:7em,height:7em});
$("#block4").animate({width:7em,height:7em});
$("#block5").animate({width:7em,height:7em,function(){
$(this).animate({width:20em,height:20em,top:4em,left:8em});
});
});
});
是應該得到一些「便利貼」形盒子到
1:讓所有的箱子回到原來的位置和大小
2:彈出他們的原始位置去屏幕中間,而放大時點擊..
你有什麼想法爲什麼這個不起作用? (我不想要一個CSS懸停,但如果有另一種方式,通過CSS做到這一點,我沒事吧!!)
爲什麼要將'click'處理程序綁定到文檔? –
我的第一個問題是您的方法調用不太正確。 '.animate({width:7em,height:7em)};' - 括號的方式是錯誤的。 – ahren
hehe ..好吧,我的主要目標是將它綁定在我點擊的5個塊中的任何一個上。不完全按照這種方式工作,right,=) – BDdL