You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.
I'm using the jPanelMenu jQuery plugin on one of my websites, I'm also using smoothscrolling with jQuery. I noticed a problem in IE (all versions).
When the menu is triggered, it slides in as it's supposed to. After clicking a menu item, the page scrolls to the desired section and closes again. As the menu closes, the right side of the website gets an unwanted margin. When opening the menu again, it's half it's size and closes the gap of the content again.
Here's the code I'm using for the menu and smooth scroll.
I'm using the jPanelMenu jQuery plugin on one of my websites, I'm also using smoothscrolling with jQuery. I noticed a problem in IE (all versions).
When the menu is triggered, it slides in as it's supposed to. After clicking a menu item, the page scrolls to the desired section and closes again. As the menu closes, the right side of the website gets an unwanted margin. When opening the menu again, it's half it's size and closes the gap of the content again.
Here's the code I'm using for the menu and smooth scroll.
<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>Thanks in advance for helping me out!
The text was updated successfully, but these errors were encountered: