I have the following code:
<div class="field field-name-field-new-photo field-type-image field-label-above">
<div class="field-label">New Photo: </div>
<div class="field-items">
<div class="field-item even">
<img typeof="foaf:Image" src="some-image-here.jpg" width="500" height="300" alt="" />
</div>
</div>
</div>
I would like to check if an image is present because if it is, then I want to disable a different image elsewhere on the page.
I have tried the following but it is not working:
if ( $(".field-name-field-new-photo").length ) {
$(".field-name-field-fallback-photo").hide;
}
Any pointers as to what I am doing painfully wrong would be appreciated.