/** * Responsive Control JavaScript * Handles device switching in WordPress Customizer */ (function($) { 'use strict'; wp.customize.bind('ready', function() { // Handle device button clicks $(document).on('click', '.blockenix-device-btn', function(e) { e.preventDefault(); var $button = $(this); var $control = $button.closest('.customize-control-blockenix_responsive'); var device = $button.data('device'); // Update active button $control.find('.blockenix-device-btn').removeClass('active'); $button.addClass('active'); // Show/hide inputs $control.find('.blockenix-device-input').removeClass('active'); $control.find('.blockenix-device-input[data-device="' + device + '"]').addClass('active'); }); }); })(jQuery);