隐藏帐户选项-跨度值

时间:2018-07-22 06:23:14

标签: jquery

嗨,我正在尝试在以下页面上加载“正在帐户”值:/ payment / invoices

image of view

请查看该区域的代码:

<tbody>
  <tr>
    <td class="col-method-selection">
      <label class="radio">
        <span class="rdb">
          <input data-name="On Account" data-total-amount="$6.36" id="36a83d45-975c-42ee-9bdf-84335e056793" name="MethodId" tabindex="1" type="radio" value="36a83d45-975c-42ee-9bdf-84335e056793">
          <ins><!----></ins>
        </span>
        <img class="method-img" src="/content/files/icons/ptl.png" alt="On Account">
      </label>
    </td>
    <td class="col-method-name">
      <label for="36a83d45-975c-42ee-9bdf-84335e056793" class="method-title">On Account</label>
    </td>
    <td class="col-method-cost">
      <span class="currency-sign font-lighter">$</span>
      <span class="cell-price-value">0.00</span>
    </td>
  </tr>
  <tr>
    <td class="col-method-selection">
      <label class="radio">
        <span class="rdb">
          <input checked="checked" data-name="Credit Card" data-total-amount="$6.36" id="3a16ff33-e2ca-441a-9619-80397ff1cd44" name="MethodId" tabindex="1" type="radio" value="3a16ff33-e2ca-441a-9619-80397ff1cd44">
          <ins><!----></ins>
        </span>
        <img class="method-img" src="/content/files/icons/visa.png" alt="Credit Card">
      </label>
    </td>
    <td class="col-method-name">
      <label for="3a16ff33-e2ca-441a-9619-80397ff1cd44" class="method-title">Credit Card</label>
    </td>
    <td class="col-method-cost">
      <span class="currency-sign font-lighter">$</span>
      <span class="cell-price-value">0.00</span>
    </td>
  </tr>
</tbody>

1 个答案:

答案 0 :(得分:0)

尝试定位一些已知的内容,该内容不会因交易而改变。然后用它来隐藏整行。

我的想法是这样的:

$(document).find("[data-name='On Account']").closest("tr").hide();