PDA

View Full Version : Resolved JQuery - Resizing all images depending on their original size.


Apothem
04-05-2009, 07:59 PM
I'm not experience with JavaScript so sorry if I'm slow on this.

So I want to use JQuery to:
1. Locate all images from the div id #images.
2. Check each image's size if it's over 800px.
3. If an image size is over 800px, resize it to 800px.
4. If an image size is over 800px, add a small text above it saying "This image has been resized!"
5. If an image size is over 800px, add an onclick event so that the image can be returned to its original size OR if already at original size, resize back to 800px.

What do I need to know to do this (or if it's too much of an explanation, paste the code that does all of this and I'll try to decrypt it...)

Philip M
04-05-2009, 08:09 PM
As this involves JQuery I suggest that you ask a mod to move this over to the Javascript frameworks forum.

Apostropartheid
04-05-2009, 08:50 PM
Cheers Philip.
Moved by user request.