Site icon Hip-Hop Website Design and Development

How you can refresh Theme Customizer after change colour inside wpColorPicker?

I develop my customized widget with setting the place I can arrange customized colour for the widget. I take advantage of this code to initialize wpColorPicker as a substitute of default textual content enter in kind() technique of Widget class:

jQuery(doc).prepared(perform($){
    $('#<?php echo $this->get_field_id( 'bg_color_1' ); ?>').wpColorPicker();
});

All works nice however if you’re attempting change the colour in Theme Customizer after altering worth nothing occurs: the Save button nonetheless not lively and web site web page not refreshing with the brand new colour.

Beforehand attempting for triggering change occasion, however not working:

$('#<?php echo $this->get_field_id( 'bg_color_1' ); ?>').wpColorPicker({
    change: perform(occasion, ui) {
        $('#<?php echo $this->get_field_id( 'bg_color_1' ); ?>').change();
    }
});

How you can reload the web page preview (set off the occasion when worth inside my enter have been modified)?