I am trying to achieve following using HTML, CSS, JS.
I have two check boxes and 4 Images:
- If none of them are checked -> show Image1 - Hide others
- If 1st is checked -> show Image2 - Hide others
- If 2nd is checked -> show Image3 - Hide others
- If both are checked -> show Image4 - Hide others
<input id="chk-box1" type="checkbox"> checkbox 1 </input>
<input id="chk-box2" type="checkbox" > checkbox 2 </input>
<img alt="" id="1" src="1.jpg" />
<img alt="" id="2" src="2.jpg" />
<img alt="" id="3" src="3.jpg" />
<img alt="" id="4" src="4.jpg" />
See Question&Answers more detail:os