Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function($){
- var myOptions = {
- // you can declare a default color here,
- // or in the data-default-color attribute on the input
- defaultColor: false,
- // a callback to fire whenever the color changes to a valid color
- change: function(event, ui){},
- // a callback to fire when the input is emptied or an invalid color
- clear: function() {},
- // hide the color picker controls on load
- hide: false,
- // show a group of common colors beneath the square
- // or, supply an array of colors to customize further
- palettes: true
- };
- $('.my-color-field').each(function() {
- $('.my-color-field').wpColorPicker();
- });
- $('.my-color-field').live('click',function() {
- $(this).wpColorPicker();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement