8 comments
Joel L, almost 9 years ago
If there's a problem with people accidentally clicking mailto links, the actual fix would be to make the link include the email address to set clear expectations, no?
Catalin Cimpanu, almost 9 years ago
Yes!
Smart man right above ↑
Leon Kennedy, almost 9 years ago
Mailto links that open without a notification annoy me so much. Sometimes you see peoples names on a website, or see a contact link, and click on them expecting to find more information about that person or to look for ways to contact a person, and suddenly this email client pops up out of nowhere. Can't close it before its finished loading, and when it has finally loaded you close it and get another popup if you want to save your 'draft' you just made accidentally, or it just stores all the mailto links you accidentally clicked on in your drafts every time you close them. After all this hassle I'm not interested in finding out anything more on that website and will leave. Argh, I'm sorry for the wall of text, I just hate it so much.
Diederik Eenschooten, almost 9 years ago
Mhh not very difficult. Not sure why you should include a separate file something this easy imo
EJ Fox, almost 9 years ago
Care to share the easy alternative?
Catalin Cimpanu, almost 9 years ago
Copy-pasting the plugin's source into your main JS file so you don't include it as a separate file. It's only 40 lines of code.
Alex Ander, almost 9 years ago
You don't even need to do that. It's like three lines of JS if you're not interested in making a general solution. Just a click bind and an alert.
Will Froelich, almost 9 years ago (edited almost 9 years ago )
$("a[href^='mailto']").on('click', function(e){ if(!confim("Are you sure you wanna email")){ e.preventDefault(); } });
Login to Comment
You'll need to log in before you can leave a comment.
LoginRegister Today
New accounts can leave comments immediately, and gain full permissions after one week.
Register now