PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 2.0.14
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v2.0.14
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
betterdocs / admin / assets / js / customizer-toggle-control.js

customizer-toggle-control.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 2.0.14, at admin/assets/js/customizer-toggle-control.js

29 lines 989 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 * Script run inside a Customizer control sidebar
3 *
4 * Enable / disable the control title by toggeling its .disabled-control-title style class on or off.
5 */
6 ( function( $ ) {
7 wp.customize.bind( 'ready', function() { // Ready?
8
9 var customize = this; // Customize object alias.
10 // Array with the control names
11 // TODO: Replace #CONTROLNAME01#, #CONTROLNAME02# etc with the real control names.
12 var toggleControls = [
13 '#CONTROLNAME01#',
14 '#CONTROLNAME02#'
15 ];
16 $.each( toggleControls, function( index, control_name ) {
17 customize( control_name, function( value ) {
18 var controlTitle = customize.control( control_name ).container.find( '.customize-control-title' ); // Get control title.
19 // 1. On loading.
20 controlTitle.toggleClass('disabled-control-title', !value.get() );
21 // 2. Binding to value change.
22 value.bind( function( to ) {
23 controlTitle.toggleClass( 'disabled-control-title', !value.get() );
24 } );
25 } );
26 } );
27 } );
28 } )( jQuery );
29