jquery: how can you select texts not surrounded by html tags?

后端 未结 7 2144
Beer

Vodka
rum
whiskey

how can you select beer ? or rum ? in jquery ? they are not surrounded by any html tags....

7条回答
  •  天涯浪人
    2021-01-18 16:12

    What about a little DOM altering? First select nodes, which contain desired string, than run a function, which replaces every occurence of "string" with "string"

    We need no external plugins for this

    Vodka
    Rum
    Whiskey

    I've created this script really fast, so don't judge harshly :) (and it's 2:28AM :-D)

提交回复
热议问题