0

There have been questions about this in the past (not very recent from what I can tell.) It's clear that $(:contains()) can work, however my text has protected characters. I know I can escape this with regex, but I'd like to avoid the extra cost if possible. So, I'm wondering if there is a standard solution to this problem, perhaps a function I can call? Or even, is it possible to call jQuery's contains without having to pass it through a string selector?

In my case I only need the first result, if theres any algorithms that consider that, and I also need to be able to manipulate the containing element or at least replace the relevant text.

Hunter
  • 159
  • 1
  • 7

0 Answers0