Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list = $('mainbody_public').select("img");
- for (i=0;i<list.length;i++) {
- tmpWidth = list[i].getWidth();
- tmpHeight = list[i].getHeight();
- if (tmpWidth > 450) {
- newWidth = 450;
- diff = tmpWidth - newWidth;
- newHeight = tmpHeight - diff;
- list[i].writeAttribute('width', newWidth);
- list[i].writeAttribute('height', newHeight);
- }
- }
Add Comment
Please, Sign In to add comment