-2

SORRY for Asking This, Because it already asked.

Trying to prevent to load image of a div .element if it has class .block / <div class="element block"> .

HTML:

 <div class="element">
<img src="images/picture.jpg" alt="" />
<img src="images/picture.jpg" alt="" />
 </div>

Mean prevent to load all images of <div class="element"> when it has a class .block.
Don't hide, Delete image from html Node acceptable.

Aariba
  • 1,174
  • 5
  • 20
  • 52

1 Answers1

-2

You can hide it in pure javascript like this but you have to add id and not class to your element

document.getElementById("element").style.display= "none";

and in jquery

$('.element').css('display', 'none');
Mat.
  • 541
  • 2
  • 11