-
- $('#defaultcolor').click(function() {
- pickColor(default_color);
- $('#text-color').val(default_color);
- });
-
- $('#text-color').keyup(function() {
- var _hex = $('#text-color').val();
- var hex = _hex;
- if ( hex[0] != '#' )
- hex = '#' + hex;
- hex = hex.replace(/[^#a-fA-F0-9]+/, '');
- if ( hex != _hex )
- $('#text-color').val(hex);
- if ( hex.length == 4 || hex.length == 7 )
- pickColor( hex );
- });
-
- $(document).mousedown(function(){
- $('#color-picker').each( function() {
- var display = $(this).css('display');
- if (display == 'block')
- $(this).fadeOut(2);
- });
- });
-
- farbtastic = $.farbtastic('#color-picker', function(color) { pickColor(color); });
- <?php if ( display_header_text() ) { ?>
- pickColor('#<?php echo get_header_textcolor(); ?>');
- <?php } else { ?>