View Single Post
Old 12-24-2011, 02:42 AM   PM User | #9
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,461
Thanks: 52
Thanked 457 Times in 455 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
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";
    }
}
xelawho is offline   Reply With Quote