Is there any way to speed up this solution for a case-insensitive jQuery :contains selector?

前端 未结 5 1157
萌比男神i
萌比男神i 2021-02-09 14:11

I found this solution for a case-insensitive jQuery :contains selector on StackOverflow. It works great, however it comes at the cost of performance. Does anyone el

5条回答
  •  春和景丽
    2021-02-09 14:39

    here's a follow up question: What's the deal with jQuery.text()? Why's it so slow?

    I suspect that it's slow due to the $(a) (converting the DOM element to a jQuery object) and not the .text().

提交回复
热议问题