2014-03-24 73 views

回答

2

您需要刪除+=100px之間的間隔改變,當你height

$('img').click(function(){ 
    $('.popup').animate({'height': '+=100px','width':'+=100px' }) 
}) 
//-----------------------------------^ here 

JSFiddle

注:我敢肯定你知道,但你不會看到而沒有任何影響div有財產display:none

+2

你還應該提到從'.popup'中刪除'display:none'。 – Vucko

+0

@Vucko正在編輯。但可能會認爲這很明顯。 – George

+0

@ C-link [not really](http://jsfiddle.net/fg5h4/4/)。 – Vucko