Hi I've used this code (here is the jsfiddle) to create a collapsable sidebar it's working ok, except that the main content moves left to fill the space of the collapsed sidebar.
Here's a couple of screen shots to illustrate:
With scrollbar:
Without scrollbar:
Can someone please give me an idea what I need to change to stop the main content moving left.
This is the javascript I have to collapse the sidebar onclick, I think I need to add some code here
(+ some css for the image) to stop the image moving left.
Any help much appreciated
Here's a couple of screen shots to illustrate:
With scrollbar:
Without scrollbar:
Can someone please give me an idea what I need to change to stop the main content moving left.
This is the javascript I have to collapse the sidebar onclick, I think I need to add some code here
(+ some css for the image) to stop the image moving left.
JavaScript:
$(document).ready(function() {
$('.example').magnify();
$("#sidebar-toggle").on("click", function () {
$("#wrapper").toggleClass("no-sidebar");
});
});