Advertisement
bowenac

Untitled

Jan 29th, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function($){
  2. var myOptions = {
  3.     // you can declare a default color here,
  4.     // or in the data-default-color attribute on the input
  5.     defaultColor: false,
  6.     // a callback to fire whenever the color changes to a valid color
  7.     change: function(event, ui){},
  8.     // a callback to fire when the input is emptied or an invalid color
  9.     clear: function() {},
  10.     // hide the color picker controls on load
  11.     hide: false,
  12.     // show a group of common colors beneath the square
  13.     // or, supply an array of colors to customize further
  14.     palettes: true
  15. };
  16.  
  17. $('.my-color-field').each(function() {
  18. $('.my-color-field').wpColorPicker();
  19. });
  20.  
  21. $('.my-color-field').live('click',function() {
  22. $(this).wpColorPicker();
  23. });
  24.  
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement