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.
MIT License
962 stars 207 forks source link

restore scroll event if closed without close button #39

Open fortm opened 8 years ago

fortm commented 8 years ago

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');
  }
});