HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/delstar/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);
    }
});