joaopereirawd / animatedModal.js

animatedModal.js is a jQuery plugin to create a fullscreen modal with CSS3 transitions. You can use the transitions from animate.css or create your own transitions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

restore scroll event if closed without close button

fortm opened this issue · comments

commented

If there is left drawer and full screen modal is opened. When user clicks on drawer and navigates to other menu item without using fullscreen modal close button, the scroll is disabled on the later pages.

Only when close button is used to close the modal scroll event is restored.

Is there a way to fix this ?

$("#demo02").animatedModal({
   beforeOpen: function() {
        $("html, body").animate({ scrollTop: 0 }, "slow");
   },
  afterClose: function() {
       $('body').removeAttr('style');
  }
});