Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dynamically resize images w/ jquery

I'm using a script that uses DD's Ultimate Fade-in Slideshow: http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

It uses jquery, and I would like to resize the images to the slideshow size.

Thanks!

like image 427
Jason Avatar asked May 21 '26 13:05

Jason


1 Answers

If you want to animate the size of the images you can use:

jQuery('#imgID').animate({
  width: newwidth,
  height: newheight
});

or if you don't want to animate the resizing just use

jQuery('#imgID').css({'width':'newwidth', 'height':'newheight'});

newheight and newwidth would be integers of whatever dimensions you want to give it. i.e. 100px x 200px

like image 58
Mark Avatar answered May 23 '26 01:05

Mark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!