17 lines
514 B
JavaScript
17 lines
514 B
JavaScript
let portfolio = document.getElementsByClassName('portfolio');
|
|
let art = document.getElementsByClassName('art');
|
|
let lore = document.getElementsByClassName('lore');
|
|
let box = document.getElementById('box');
|
|
|
|
let links = [ portfolio[0], art[0], lore[0] ];
|
|
|
|
links.forEach((link) => {
|
|
link.addEventListener('mouseover', (e) => {
|
|
//console.log('hovered');
|
|
box.classList.add('colorBorder');
|
|
});
|
|
link.addEventListener('mouseleave', (e) => {
|
|
//console.log('left');
|
|
box.classList.remove('colorBorder');
|
|
});
|
|
});
|