Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add classnames to body

openModal = (event) => {
  document.body.classList.add('modal-open');
  this.setState({ showModal: true });
}
hideModal = (event) => {
  document.body.classList.remove('modal-open');
  this.setState({ showModal: false });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #classnames #body
ADD COMMENT
Topic
Name
4+5 =