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

前端 未结 5 1089
萌比男神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:28

    you could try not checking after each keystroke, but maybe a second after the last keystroke has been pressed. this way you're not constantly checking while the user is typing but rather checking when the user is finished or pausing typing.

提交回复
热议问题