• File: buildbench-admin.js
  • Full Path: /home/chassiw/www/buildbench/assets/js/buildbench-admin.js
  • File size: 601 bytes
  • MIME-type: text/plain
  • Charset: utf-8
jQuery( document ).ready( function($){
    "use strict";
    
    // auto hide according to selected post format
    $('#post-formats-select').on('change', 'input[name=post_format]:checked', function(){
        var metaboxes = '#fw-options-box-settings-featured-video, #fw-options-box-settings-featured-gallery, #fw-options-box-settings-featured-audio';
        $(metaboxes).hide();

        var selected_format = $(this).val();
        $('#fw-options-box-settings-featured-' + selected_format).show(); 
    });
    $( "#post-formats-select input[name=post_format]:checked" ).trigger( "change" );

});