I am trying to use javascript to get my modal to close when you click outside but it doesn't seem to be working, can anybody help?
var clickHandler = function () {
if (!f.target) f.target = f.srcElement;
if (f.target.tagName == "DIV") {
if (f.target.id != "window") closeModal(f);
}
Tried the above but no luck, any clues?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/mrOCHFT
Comments
Post a Comment