Quote:
Originally Posted by xelawho
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