Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. var myOptions = {
  2. // you can declare a default color here,
  3. // or in the data-default-color attribute on the input
  4. defaultColor: '#000',
  5. // a callback to fire whenever the color changes to a valid color
  6. change: function(event, ui){
  7.  
  8. },
  9. // a callback to fire when the input is emptied or an invalid color
  10. clear: function() {},
  11. // hide the color picker controls on load
  12. hide: true,
  13. // show a group of common colors beneath the square
  14. // or, supply an array of colors to customize further
  15. palettes: true
  16. };
  17.  
  18. // Add Color Picker to all inputs that have 'color-field' class $('.color-field').wpColorPicker(myOptions);
  19.  
  20. change: function(event, ui){
  21. $(this).trigger('change');
  22. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement