SyntaxFix
Write A Post
Hire A Developer
Questions
$(element).click(function(){ window.close(); });
Note: you can not close any window that you didn't opened with window.open. Directly invoking window.close() will ask user with a dialogue box.
window.open
window.close()