我正在尝试隐藏div正常但显示为用户点击下拉列表 但没有工作jquery
<div class="form-group">
<label>Select Course</label>
<select name="timepass" class="custom-select">
<option>Select</option>
<option id="cour">Php Developer</option>
<option>Asp.Net</option>
<option>Python</option>
</select>
</div>
<div class="mj_tabcontent mj_bottompadder80" id="std-list">
<table class="table table-striped">
<tr>
<td>
<h4><a href="requirement_detail.html">Mudassir Abbas</a></h4>
</td>
</td>
<td>
<div class="col-xs-2">
<input type="text" placeholder="Grade" class="grade">
</div>
</td>
</tr>
<td>
<h4><a href="job_detail.html">Ziab u Nisa</a></h4>
</td>
<td>
<div class="col-xs-2">
<input type="text" placeholder="Grade" class="grade">
</div>
</td>
</tr>
</tr>
<td>
<h4><a href="job_detail.html">Raja M.Waleed</a></h4>
</td>
<td>
<div class="col-xs-2">
<input type="text" placeholder="Grade" class="grade">
</div>
</td>
</tr>
</table>
</div>
java script code is
<script>
$($document).ready(function(){
$("#std-list").hide();
$("#cour").click( function(){
$("#std-list").show();
});
});
</script>
答案 0 :(得分:0)
根据我的理解,代码如下。请检查,我希望它可以帮助你..
match_parent
答案 1 :(得分:0)
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide(1000);
});
$("#show").click(function(){
$("p").show(1000);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<p>If you click on the "Hide" button,<br> I will disappear.</p>
<button id="hide">Hide</button>
<button id="show">Show</button>