# charitable/1.6.6/assets/js/charitable-customizer.js

Charitable – Donation &amp; Fundraising Platform (Donation Forms, Recurring Donations &amp; Fundraising Campaigns), version 1.6.6. 17 lines.

- Page: https://pluginprobe.com/plugins/charitable/1.6.6/code/assets/js/charitable-customizer.js
- Raw: https://pluginprobe.com/plugins/charitable/1.6.6/raw/assets/js/charitable-customizer.js
- Modified: 2018-09-17T12:08:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/charitable/1.6.6/code/assets/js/charitable-customizer.js#L10-L20`.

```javascript
( function( $ ) {

    var update_highlight_colour = function( colour ) {
        var $styles = $( '#charitable-highlight-colour-styles' );
        $styles.html("")
            .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 + ";}" )
            .append( ".campaign-progress-bar .bar, .donate-button, #charitable-donation-form .donation-amount.selected, #charitable-donation-amount-form .donation-amount.selected { background-color: " + colour + ";}" )
            .append( "#charitable-donation-form .donation-amount.selected, #charitable-donation-amount-form .donation-amount.selected, .charitable-notice { border-color: " + colour + ";}" );
    };    

    wp.customize( 'charitable_settings[highlight_colour]', function( value ) {
        value.bind( function( newval ) {
            update_highlight_colour( newval );
        });
    });

})( jQuery );
```
