jQuery: adding tooltips to parts of text in a textarea, and removing them when user starts editing it
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
精彩评论