| 1 |
( function( $ ) { |
| 2 |
|
| 3 |
var update_highlight_colour = function( colour ) { |
| 4 |
var $styles = $( '#charitable-highlight-colour-styles' ); |
| 5 |
$styles.html("") |
| 6 |
.append( ".campaign-raised .amount, .campaign-figures .amount, .donors-count, .time-left, .charitable-form-field a:not(.button), .charitable-form-fields .charitable-fieldset a:not(.button), .charitable-notice,.charitable-notice .errors a{ color: " + colour + ";}" ) |
| 7 |
.append( ".campaign-progress-bar .bar, .donate-button, #charitable-donation-form .donation-amount.selected, #charitable-donation-amount-form .donation-amount.selected { background-color: " + colour + ";}" ) |
| 8 |
.append( "#charitable-donation-form .donation-amount.selected, #charitable-donation-amount-form .donation-amount.selected, .charitable-notice { border-color: " + colour + ";}" ); |
| 9 |
}; |
| 10 |
|
| 11 |
wp.customize( 'charitable_settings[highlight_colour]', function( value ) { |
| 12 |
value.bind( function( newval ) { |
| 13 |
update_highlight_colour( newval ); |
| 14 |
}); |
| 15 |
}); |
| 16 |
|
| 17 |
})( jQuery ); |