查看我的应用中的多个表的<a> tags using jquery with no span of particular text in it

时间:2016-08-31 21:00:21

标签: javascript jquery

I am trying to find tags which does not have span of particular text as child element.

HTML


      <div>
        <a class = "Enabled Select">
          <span>Text1</span></a>
        <a class = "EnabledSelect">
          <span>Text1</span></a>
        <a class = "Enabled Select">
          <span>DonotSelectme</span></a>
        <a class = "Enabled Select">
          <span>Text1</span></a>
        <a class = "Enabled Select">
          <span>DonotSelectme</span>
      <a class = "Enabled ImageLink">
          <span>DonotSelectme</span></a>
     <a class = "Enabled ImageLink">
          <span>SelectMe</span></a>
    </div>

Jquery so far

$link= `$("a.Enabled.Select").not(".ImageLink").not("span:contains('DonotSelectme')")

It should return three a tags back to me.

      <a class = "Enabled Select">             
      <a class = "Enabled Select">
     <a class = "Enabled Select">

1 个答案:

答案 0 :(得分:0)

MyMessageBoxWindow

这就是我要找的东西