tags:

views:

28

answers:

1

Hi friends! I have two images and those are layered on each other using z-index. I want to increase there height and width by 20 from there current height and width whenever a button is clicked. I have assigned height and width to one image using a css class and for another image using style property in tag

Friends! I increased the height and width of one image by setting its height and width. But this is achieved by hard coding so it works only one time i.e. when button is clicked first time. Question 1. How can I increase the height and width of both images at the same time from there current height and width?

Please guide me friends! Thank You!

+1  A: 

Have you tried width and height functions:

var img = $('#imgid');
img.width(img.width() + 20);
img.height(img.height() + 50);
Darin Dimitrov