如何在多个地方使用特定类时选择它。我想在单击“感觉类”时显示“隐藏类”,隐藏类和感觉类在文档中使用了 3 次
我想在单击“感觉”类时显示特定的“隐藏类”
我试过了, $(this).find(className) and $(clasName , this)但它不工作
$(document).ready(function() {
$(".hide").hide();
$(".feel").click(function() {
alert("s");
$(this).find(".hide").show();
});
});
<body>
<script src="https://code.jquery.com/jquery.min.js"></script>
<p class="feel">
<b> Note: </b>
</p>
<p class="hide">
The :hover selector style links on mouse-over.
</p>
<p class="feel">
<b> Note: </b>
</p>
<p class="hide">
The :hover selector style links on mouse-over.
</p>
<p class="feel">
<b> Note: </b>
</p>
<p class="hide">
The :hover selector style links on mouse-over.
</p>
</body>