I am using jPanelMenu jQuery plugin on one of my sites. I noticed a problem in IE (all versions).
When the menu starts, it moves as intended. After clicking on the menu item, the page scrolls to the desired section and closes again. When the menu closes, the right side of the website gets unwanted stock. When you open the menu again, it reduces its size and closes the space again.
Here is the fiddle: http://jsfiddle.net/huzLU/1/
And three screenshots showing the problem in IE:
Here is the code I use for the menu:
<script> $(document).on('touchend',jP.panel,function(e){ e.preventDefault(); if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated); }); $(document).on('click',jP.panel,function(e){ e.preventDefault(); if ( jP.menuIsOpen() ) jP.closeMenu(jP.options.animated); }); </script> <script> $(document).ready(function(){ var jPM = $.jPanelMenu({ closeOnContentClick: false }); jPM.on(); $('a[href^="#"]').on('click',function (e) { e.preventDefault(); var target = this.hash, $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top-50 }, 900, 'swing', function () { window.location.hash = target; }); setTimeout(function() { jPM.close(true); }, 900, 'swing'); }); }); </script>
Also; here is a link to the site: www.didson.nl
I hope someone can help me, thanks in advance!
javascript jquery css internet-explorer jpanelmenu
Maarten emmerink
source share