如何隐藏头部和柱子?

时间:2017-08-17 04:10:07

标签: javascript jquery css

我需要使用jQuery隐藏head和column。以下代码不起作用。

$('#MD116139889_ZIPCODE_InputField').find('.input-group-addon').click(function(){
    $('.116141670_ZIPCODE_IDPopupHead').hide();
    $('.116141670_ZIPCODE_IDPopupCol').hide();
});

Table Image

<div id="MD116139889_ZIPCODE_dialog" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 76px; max-height: none;">
<div id="popUpContentResult" class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th width="30%" height="19" class="text-center 116141670_ZIPCODE_IDPopupHead">ZipId</th>
<th class="text-center 116141670_ZIPCODEPopupHead">Zip Code</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" class="text-center 116141670_ZIPCODE_IDPopupCol"><a href="Javascript:selectitem0();">00196</a></td>
</tr>
</tbody>

1 个答案:

答案 0 :(得分:0)

我为一个简单的测试用例取出了bind的find(),但似乎工作正常。

&#13;
&#13;
$('#MD116139889_ZIPCODE_InputField').click(function() {
  $('.116141670_ZIPCODE_IDPopupHead').hide();
  $('.116141670_ZIPCODE_IDPopupCol').hide();
});
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="MD116139889_ZIPCODE_dialog" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 76px; max-height: none;">
  <div id="popUpContentResult" class="table-responsive">
    <table class="table table-hover">
      <thead>
        <tr>
          <th width="30%" height="19" class="text-center 116141670_ZIPCODE_IDPopupHead">ZipId</th>
          <th class="text-center 116141670_ZIPCODEPopupHead">Zip Code</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td align="center" class="text-center 116141670_ZIPCODE_IDPopupCol"><a href="Javascript:selectitem0();">00196</a></td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
<button id="MD116139889_ZIPCODE_InputField">Click Me</button>
&#13;
&#13;
&#13;