Created by: tgriesser
Because .modal
takes up the entire screen now, clicks won't reach the background div... This binds to the the .modal
area, checking if e.target === e.currentTarget
, which will only be the case if you're clicking outside of the .modal-content
area.
Test included, semicolons excluded.