How to select and highlight a word from a paragraph on a mouse even in jquery or javascript? -


I have searched everywhere for this problem but I still can not get a good example, I choose a word Do it and highlight it as I have clicked on it, I know that you can highlight the entire paragraph but it is not what you are seeing, if someone knows or how it is done If there is any idea about this, please tell me.

> Thanks.

I have done a quick Google search (as I thought that someone might already have it Is covered) and this JSWoodloads I am modifying a bit which does a lot of you (not saying this is the best way):

  $ ('div'). Replace (/ \ b (\ w +) \ b / g, ""; $ 1 & lt; / span & gt; "));}); $ ('Div span'). Click (function () {$ (this) .css ('background-color', '# ffff66');});  


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -