title: Colorpicker mjolnic.com custom element color change
body: <p>I'm using this plugin:</p>
  
  <p><a href="http://mjolnic.com/bootstrap-colorpicker/" rel="nofollow">http://mjolnic.com/bootstrap-colorpicker/</a></p>
  
  <p>The example below shows how to change the body background color. How can I get it to work to with my custom element/class instead of the body?</p>
  
  <p><strong>My custom element I would like to get to work with:</strong></p>
  
  <pre><code>&lt;div class="strikethrough"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>Body, working example as the demo:</strong></p>
  
  <pre><code>  &lt;script&gt;
      $( document ).ready(function() {
  
      var bodyStyle = $('body')[0].style;
  
      $('.my-colorpicker').colorpicker().on('changeColor.colorpicker', function(event){
        bodyStyle.backgroundColor = event.color.toHex();
      });
  
  });
  &lt;/script&gt;
  </code></pre>