I want to hide the element with class = "product-details-card" by hovering over the element with class = "v-content__wrap".
See this website
http://webtest.brooksbingham.com/module/bespokestudio/viewer#/
This is a part of my code:
<div class="product-details-card">
card
</div>
<main class="v-content">
<div class="v-content__wrap">
<div class="viewport-wrapper">
1234
<canvas>
</div>
</div>
</main>
This is a codepen:
https://codepen.io/boidurja-talukdar/pen/dybjQrq
I tried using javascript. But it was not working.
document.getElementsByClassName("v-content__wrap")[0].onmouseover = f1();
document.getElementsByClassName("v-content__wrap")[0].onmouseout = f2();
function f1() {
document.getElementsByClassName("product-details-card")[0].style.display = "none";
}
function f2() {
document.getElementsByClassName("product-details-card")[0].style.display = "block";
}
Note: I can't change the html code since it is in Prestashop.