jquery resize image

Posted by Scarface on Stack Overflow See other posts from Stack Overflow or by Scarface
Published on 2010-05-06T23:39:46Z Indexed on 2010/05/06 23:48 UTC
Read the original article Hit count: 329

Filed under:
|

Hey guys, quick question, all I want to do is resize an image to fit inside a small container when I run this function. Right now, only a portion of the image is shown inside the div. If anyone has any ideas, I would appreciate any advice.

$(this)
       .css({
           backgroundImage    : 'url(' + src + ')',   // set background image
           backgroundPosition : 'center center',      // position background image
           backgroundRepeat   : 'no-repeat'           // don't repeat image
       });

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css