How do I see if an image with 2px or more exist? Current code:
if( $("#imageID").length < 10) {
//Do something
}
How do I see if an image with 2px or more exist? Current code:
if( $("#imageID").length < 10) {
//Do something
}
You can use naturalWidth and naturalHeight property of the image element.
if( document.getElementById("imageID").naturalWidth > 2) { // TO DO: do something
}