nancypannikkat/js/general.js

21 lines
678 B
JavaScript
Raw Permalink Normal View History

2023-01-04 22:45:24 -08:00
document.addEventListener( 'DOMContentLoaded', function() {
2023-01-09 23:35:51 -08:00
window.onload = function() {
uncheck('menu-btn');
};
function uncheck(id) {
document.getElementById(id).checked = false;
}
2023-01-28 13:59:57 -08:00
//Email Replace
function setAttributes(elem, attrs) {
for(var key in attrs) {
elem.setAttribute(key, attrs[key]);
}
}
2023-01-28 14:03:34 -08:00
const emails = document.querySelectorAll('.email-replace');
emails.forEach(entry => {
2023-01-28 13:59:57 -08:00
setAttributes(entry, {"href": "mailto:nancypannikkat" + "@" + "gmail.com?subject=Art Purchase Inquiry", "target": "_blank"});
entry.innerHTML = "nancypannikkat" + "@" + "gmail.com";
});
2023-01-04 22:45:24 -08:00
});