jQuery selector question. Select all nodes that do NOT START with (string)

后端 未结 3 816
臣服心动
臣服心动 2021-01-01 11:36

Trying to assemble a rather complex jQuery selector here, and having trouble.

Essentially, I\'m trying to grab all anchors that that 1) do not have a \"rel\" of \"fa

3条回答
  •  不思量自难忘°
    2021-01-01 12:16

    You want the :not selector

    $("a:not([rel=facebox],[href^=mailto])");
    

    EDIT: I stole your answer for correctness

提交回复
热议问题