Hi,
Sorry for the late reply.
Here is the code for showing/hiding sidebar:
<?php if ( wp_is_mobile() ) { ?>
<script>
jQuery(“#primary”).css(“width”, “100%”);
</script>
<?php } else { ?>
<?php if ( is_active_sidebar( ‘sidebar-1’ ) ) : ?>
<div id=”secondary” class=”widget-area” role=”complementary”>
<?php dynamic_sidebar( ‘sidebar-1’ ); ?>
</div><!– #secondary –>
<?php endif; ?>
<?php } ?>