HEX
Server: Apache
System: Linux mx52.hostgator.mx 5.14.0-687.12.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jun 7 14:39:27 EDT 2026 x86_64
User: narrativ (1644)
PHP: 8.2.33
Disabled: NONE
Upload Files
File: /home4/narrativ/www/wp-content/plugins/js_composer/modules/post-custom-layout/assets/js/module.js
jQuery( document ).ready( function ( $ ) {

    $('.vc_post-custom-layout').on('click', selectLayout);

    function selectLayout(e) {
        var selected_layout = $(e.currentTarget);
        var layout_name = selected_layout.attr('data-post-custom-layout');
        var editor_wrapper = $('#wpb_wpbakery');

        // add class that help us to hide some elements on a page that should not
        // be visible when layout is selected
        if(editor_wrapper) {
            var settings_layout = $('#vc_ui-panel-post-settings .vc_post-custom-layout[data-post-custom-layout=' + layout_name + ']');
            selected_layout = settings_layout;

            editor_wrapper.find('.vc_navbar').addClass('vc_post-custom-layout-selected');
            editor_wrapper.find('.metabox-composer-content').addClass('vc_post-custom-layout-selected');
        }

        selected_layout.addClass('vc-active-post-custom-layout');
        selected_layout.siblings().removeClass('vc-active-post-custom-layout');

        // set input that help us save layout values to post meta
        $('input[name=vc_post_custom_layout]').val(layout_name);
    }
});