var elements = document.querySelectorAll('.item');
elements.addEventListener('mouseenter', function() {
whatNeedToShow.style.display = 'block';
}, false);
elements.addEventListener('mouseleave', function() {
whatNeedToShow.style.display = 'none';
}, false);
<div class="arrow-up"></div>
<div class="arrow-down"></div>
<div class="arrow-left"></div>
<div class="arrow-right"></div>
.arrow-up {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid black;
}
.arrow-down {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #f00;
}
.arrow-right {
width: 0;
height: 0;
border-top: 60px solid transparent;
border-bottom: 60px solid transparent;
border-left: 60px solid green;
}
.arrow-left {
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right:10px solid blue;
}
How can I serve statics from several directories?
You may typically use any middleware several times within your application. With the following middleware setup and a request to "GET /javascripts/jquery.js" would first check "./public/javascripts/jquery.js", if it does not exist then the subsequent middleware will check "./files/javascripts/jquery.js".
app.use(express.static('public'));
app.use(express.static('files'));