karev
Active member
hello everyone i tried to make a simple jquery code to show and hide sidebar from index i write this little jquery function
<a id="showhide">click</a> this is the show and hide button
and in add an id="sidebar" to the aside tag in page_container but i cant remove the width of the sidebar when we hide it the is anyone who can help me with this issues please
Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#showhide').click(function() {
$('#showhide').css("cursor","pointer");
$('.mainContent').removeClass("sidebar");
$('#sidebar').toggle();
});
});
</script>
and in add an id="sidebar" to the aside tag in page_container but i cant remove the width of the sidebar when we hide it the is anyone who can help me with this issues please