<div class="form-group">
	<label class="radio-inline"><input type="radio" name='selecttype'  value='1'>Class 1</label>
	<label class="radio-inline"><input type="radio" name='selecttype' checked value='2'>Class 2</label>
 </div>

<div id='catalog' style='display:none' >
	Class 1 Content
</div>
 <div id='search'>
	Class 2 Content
</div>

<script>
	$(document).ready(function(){
		$("input[name='selecttype']").change(function () {
			if ($("input[name='selecttype']:checked").val() =='1') {
				$('#catalog').show();
				$('#search').hide();
			} else {
				$('#catalog').hide();
				$('#search').show();
			}
		});
	});
</script>
arrow
arrow
    文章標籤
    radioButton show hide
    全站熱搜

    kkkelu1008 發表在 痞客邦 留言(0) 人氣()