wp.customize.bind ready event not fired

Do not put the Customizer ready event handler inside of the jQuery event handler. The Customizer ready will trigger at jQuery ready, so you are adding the event handler too late. Just do:

wp.customize.bind('ready', function(){
    console.log('ready');
});

Your JS needs to be enqueued with customize-controls script as its dependency. Enqueue at the customize_controls_enqueue_scripts action.

Leave a Comment