I built a Modal integrated with CMS. I am using custom code to attach a class to the body tag to stop body scroll when modal is open. All good except, When the modal close button is clicked, removeClass doesnt remove the attached class from the body tag. Tried in so many ways but the class is stuck on the tag and doesnt budge. Any help is highly appreciated.
To add to Piter’s advice you may also set timeout to allow for some flexibility in changing background behaviour (for example if you need an animation to finish before showing background with re-enabled overflow):