How to target specific letter/word with jquery?

后端 未结 3 686
执念已碎
执念已碎 2021-01-19 06:17

As a mere example, I want to apply the class \"fancy\" to all occurrences of the sign \"&\" in the document.

The C

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-19 06:57

    There's a "highlight" plugin that does almost exactly what you describe:

    http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html

提交回复
热议问题