Show Div When Radio Checked
- by maniootek
I tried to use this code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
div {display: none}
</style>
<script type="text/javascript">
$('.radio1').click(function () {
$('.div1').show();
});
$('.radio2').click(function () {
$('.div2').show();
});
</script>
<label><input type="radio" name="group1" class="radio1"></label>
<label><input type="radio" name="group1" class="radio2"></label>
<div class="div1">Radio1 selected !</div>
<div class="div2">Radio2 selected !</div>
But when I check any radio then notthing happens.
I tried with Fiddle: http://jsfiddle.net/Ac9c4/
and same no results
Any idea?