nancypannikkat/js/general.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-01-04 22:45:24 -08:00
document.addEventListener( 'DOMContentLoaded', function() {
var splide = new Splide( '.splide', {
type : 'loop',
2023-01-23 00:18:06 -08:00
perPage: 1,
2023-01-04 22:45:24 -08:00
focus : 'center',
autoWidth: true,
autoplay: true,
2023-01-06 22:52:26 -08:00
mediaQuery: 'max',
breakpoints: {
2023-01-23 00:18:06 -08:00
1000: {
2023-01-06 22:52:26 -08:00
destroy: true,
},
},
2023-01-06 23:12:37 -08:00
lazyLoad: true,
keyboard: true,
isNavigation: true,
pauseOnFocus: true,
2023-01-06 23:16:52 -08:00
speed: 2000,
2023-01-09 23:35:51 -08:00
interval: 7000,
2023-01-04 22:45:24 -08:00
} );
splide.mount();
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]);
}
}
const tech_emails = document.querySelectorAll('.email-replace');
tech_emails.forEach(entry => {
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
});