Is there any selector to do a perfect match against text?

jquery

Solution

It can be done so:

var str = "whatever";

$(".elements").filter(function() {
    return $(this).text() == str;
});

Problem

On jQuery, I'm looking to a similar selector to `:contains` but I need to do a perfect match against an element text. Is there any? ``` <div>1</div> <div>12</div> <div>13</div> <div>135</div> ``` so If I look for `text = 1` I would only get the first `div`

Original source