title: Words highlight when mouse is over
body: <p>I need some kind of help. How is it possible to highlight one word in my own paste text.</p>
  
  <p>Like I have <code>&lt;textarea&gt;&lt;/textarea&gt;</code>, where I can paste text or just one sentence and when mouse is over one word it is being highlighted like here by Damovisa: <a href="http://jsfiddle.net/5gyRx/" rel="nofollow">http://jsfiddle.net/5gyRx/</a></p>
  
  <pre><code>&lt;p&gt;Each word will be wrapped in a span.&lt;/p&gt;
  &lt;p&gt;A second paragraph here.&lt;/p&gt;
  Word: &lt;span id="word"&gt;&lt;/span&gt;
  
  
  // wrap words in spans
  $('p').each(function() {
      var $this = $(this);
      $this.html($this.text().replace(/\b(\w+)\b/g, "&lt;span&gt;$1&lt;/span&gt;"));
  });
  
  // bind to each span
  $('p span').hover(
      function() { $('#word').text($(this).css('background-color','#ffff66').text()); },
      function() { $('#word').text(''); $(this).css('background-color',''); }
  );
  </code></pre>
  
  <p>Regards</p>