jQuery:使用ID从子级获取并隐藏

jQuery:使用ID从子级获取并隐藏,jquery,Jquery,这可能是一个基本的问题,但我对如何隐藏输入类型radio并在jquery中使用.find()感到困惑。代码如下: 刀片: <div class="col-lg-6 col-md-4 pt-4" id="radio_col"> <h5>Sample: <span class="etc_class" hidden><small>(Sample)</small></s

这可能是一个基本的问题,但我对如何隐藏输入类型radio并在jquery中使用.find()感到困惑。代码如下:

刀片:

 <div class="col-lg-6 col-md-4 pt-4" id="radio_col">
    <h5>Sample: <span class="etc_class" hidden><small>(Sample)</small></span></h5>
    <input type="radio" name="mode" value="sample_one" id="sample_one" class="bootstrap-switch etc">
    <label for="sample_one">Sample One</label><br>

    <input type="radio" name="mode" value="sample_two" id="sample_two" class="bootstrap-switch etc">
    <label for="sample_two">Sample two</label><br>
这并没有以某种方式隐藏带有“sample_two”的ID,或者我在脚本部分做得不对吗?有人能帮忙吗?谢谢。

$('sample_two').attr('hidden',true);
var find=$(“#radio_col”).find(“label[for=sample_two]”)。hide()

样本:(样本)
样本一

示例二
工作正常。此外,如果您还需要隐藏标签,可以使用
find.next(“label[for=sample\u two]”隐藏()。正在工作。好的@Swati,谢谢你的帮助。:)
  var find = $( "#radio_col" ).find('#sample_two');
  find.attr('hidden', true);