The code below seems to work great in Google Chrome, it hides a question in a div unless the question before it is answered.
However, it doesn't seem to work at all in I.E 8.
Can someone give me a solution on how to make it work in both browswers please?
Thank you in advance
<label for="cell">3. Do you currently have a cell phone? (Y/N)</label>
<input type="checkbox" name="cell" id="cell" data-on="Yes" data-off="No" />
<div class="hide_if_no">
<label for="blackBerry">4. If YES, is the cell phone a BlackBerry? (Y/N)</label>
<input type="checkbox" name="blackBerry" id="blackBerry" data-on="Yes" data-off="No" />
</div>
<style>
input[type=checkbox] ~ div.hide_if_no {display:none}
input[type=checkbox]:checked ~ div.hide_if_no {display:block}
</style>