View Single Post
Old 12-24-2011, 03:01 AM   PM User | #10
Charlie8776
New Coder

 
Join Date: Dec 2011
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Charlie8776 is an unknown quantity at this point
Quote:
Originally Posted by xelawho View Post
depends what you call difficult. you have to loop through them all, but that's no big deal:

Code:
function plus() {
var pics=document.getElementsByTagName('img');
for(var j = 0; j<pics.length; j++){
thepic=pics[j];
thepic.style.width= parseInt(thepic.style.width)+200+"px";
    }
}

function minus() {
var pics=document.getElementsByTagName('img');
for(var k = 0; k<pics.length; k++){
thepic=pics[k];
thepic.style.width= parseInt(thepic.style.width)-200+"px";
    }
}
Hmm, that doesn't seem to work quite right.

Code:
Message: Invalid argument.
Line: 5
Char: 1
Charlie8776 is offline   Reply With Quote