<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>
文章標籤
全站熱搜
留言列表