Jquery animation of height width not working -


i've created simple animation using jquery. event doesn't trigger animation expand div height , width.

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

fiddle

thank you.

you need remove space between += , 100px when changing height:

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

jsfiddle

note: i'm sure know, won't see effect whilst div has property display:none


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -