File size: 519 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export const TitleHide = node => {
  let title = node.querySelector("h1");
  let preview = node.querySelector(".collection-item");

  if (preview) {
    preview.addEventListener("mouseover", function() {
      setTimeout(function() {
        title.setAttribute("style", "opacity:0; ");
      }, 250);
    });
  }

  if (preview) {
    preview.addEventListener("mouseleave", function() {
      setTimeout(function() {
        title.setAttribute("style", "opacity:1; ");
      }, 250);
    });
  }
};