开发者

jQuery: adding tooltips to parts of text in a textarea, and removing them when user starts editing it

开发者 https://www.devze.com 2023-04-13 01:20 出处:网络
I am planning on buildin开发者_如何转开发g a tool that will provide suggestions to the user on his text, similar to a spellchecker.

I am planning on buildin开发者_如何转开发g a tool that will provide suggestions to the user on his text, similar to a spellchecker.

I would like to:

  • highlight problematic text
  • remove the highlighting when the user starts editing it.

How would I do this in jquery? Highlighting problematic text looks easy, even adding tooltips with a lib like qtip2, but how would I remove that highlighting as soon as the user starts to edit the text?


If you just want to remove something assign a handler to textarea's change, focus, mousedown, keydown events

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号