I am developing a website.
What does mailto:
open in if there is no email client (like Outlook, Thunderbird, etc.)?
It works on my computer, which has Outlo
The following solution works for me:
(function($)) {
$('a[href^=mailto]').each(function() {
var href = $(this).attr('href');
$(this).click(function() {
var t;
var self = $(this);
$(window).blur(function() {
// The browser apparently responded, so stop the timeout.
clearTimeout(t);
});
t = setTimeout(function() {
// The browser did not respond after 500ms, so open an alternative URL.
document.location.href = '...';
}, 500);
});
});
})(jQuery);
For more info see: https://www.uncinc.nl/articles/dealing-with-mailto-links-if-no-mail-client-is-available