Currently, I am working on creating a sidebar that slides in from the left side of the screen. To achieve this effect, I have set the menu element to float left with a width of 40% and a margin-left of -40%.
However, when I try to reveal the sidebar by swiping or pressing a button, the page resizes and zooms out to accommodate the sidebar. I have found that by setting the container width to less than 100%, I can prevent this from happening, but I still want my content to be the full width of the page.
This is the code snippet I am using to move the sidebar:
$("allContainer").animate({left: '40%'});
You can find the code here on JSFiddle for reference.
Any help or suggestions would be greatly appreciated. Thank you :)