title: How to change selected text color using colorpicker
body: <p>I am trying to use jquery colorpicker to change text color of the selected text from a div.Here is my code</p>
  
  <pre><code>var colorpickerOptions = {
  
    select: function (event, color) {
      var color_in_hex_format = color.formatted;
      document.execCommand('foreColor', false, '#'+color_in_hex_format);
      $('.colorpicker').css('background-color','#'+color_in_hex_format);
  }    
  
  ,inline: false
  };
  
  $('.colorpicker').colorpicker(colorpickerOptions);
  </code></pre>
  
  <p>But  <code>document.execCommand('foreColor', false, '#'+color_in_hex_format);</code> was not working when i choose a color from colorpicker.Why?</p>
  
  <p>Here is the demo code  <a href="http://jsfiddle.net/6V7hL/141/" rel="nofollow"><strong>FIDDLE</strong></a></p>