Showing amount only if more than one
Posted: 17 Aug 2017, 03:49
Hi!
I need to show image amount only if there are more than one.
How can I do that?
I need to show image amount only if there are more than one.
How can I do that?
X3 Photo Gallery Support Forums
https://forum.photo.gallery/
This cannot be done. If you specifically enable "image amount", and as long as there is at least one image, it will display the image amount. There is no setting "display image amount only if there are two or more images". If you were gonna do this, it would have to be hacked by javascript, something I can't just do on short notice.Haider of Sweden wrote:I need to show image amount only if there are more than one.
function hideOneImage(){
var elements = document.getElementsByClassName("amount")
for (var i = 0; i < elements.length; i++){
if(elements[i].innerHTML == "1 image"){
elements[i].style.display = "none";
}
}
}
hideOneImage();