I have made a JavaScript script which will scan through a webpage for all of the .gif files and set their visibility properties to "hidden". This allows me to select what type of image I want to show on my page… I used this code:
function makeAllGIF(){
var x = document.getElementsByTagName("img");
for(i = 0 ; i < x.length; i++){
var y = x.item(i);
if(y.getAttribute("src").match("gif") != null){
y.style.visibility = "visible";
}
else{
y.style.visibility = "hidden";
}
}
}
Changing the code to
function makeAllGIF(){
var x = document.getElementsByTagName("img");
for(i = 0 ; i < x.length; i++){
var y = x.item(i);
if(y.getAttribute("src").match("gif") != null){
y.style.display = "normal";
}
else{
y.style.display = "none";
}
}
}
works fine.
Set the attribute
display: noneon your images.