SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Shrink an image

  1. #1
    SitePoint Addict
    Join Date
    Apr 2010
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Shrink an image

    Is it possible to shrink an image with jQuery when the page loads? I understand how to shrink a div but not an image.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Hlforr View Post
    Is it possible to shrink an image with jQuery when the page loads? I understand how to shrink a div but not an image.
    You can make an image appear smaller on the screen, but it's still the full-size image that is downloaded from your server.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Addict
    Join Date
    Apr 2010
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes that would be fine - what I am hoping for is that the full size image displays and then after a time delay the image shrinks to half its size. I managed to get it working, but it is complicated by the fact that the image is in a container div which I also want to shrink at the same time, and keep both centered on the page.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •