Skip to content

Commit

Permalink
update 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bakari1548 committed Sep 2, 2024
1 parent 4f8adaa commit abae47d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion assets/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ nav{
#text1DivSection4, #text2DivSection4, #text3DivSection4{
background-color: transparent;
width: 60%;

visibility: visible;
}
.hidden{
display: none;
Expand Down
2 changes: 1 addition & 1 deletion assets/html/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Sen:[email protected]&display=swap" rel="stylesheet">
<script src="/assets/js/home.js" defer></script>
</head>
<body>
<header>
Expand Down Expand Up @@ -274,6 +275,5 @@ <h1 class="titre_form_section7">Nous contacter</h1>
</div>
<p class="footer_text">© Copyright 2022- Libscode</p>
</footer>
<script src="/assets/js/home.js"></script>
</body>
</html>
24 changes: 17 additions & 7 deletions assets/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,36 @@ text3DivSection4.setAttribute("class", "hidden");

btnHidden1.addEventListener('click', () => {
imageBtnHidden1.setAttribute("src", "/images/display.png");
if(text1DivSection4.style.display === "block"){
text1DivSection4.classList.remove("display");
text1DivSection4.classList.add("hidden");
if(text1DivSection4.style.visibility === 'visible'){
// text1DivSection4.classList.remove("display");
// text1DivSection4.classList.add("hidden");
console.log("Oui");
}else{
text1DivSection4.classList.remove("hidden");
text1DivSection4.classList.add("display");
console.log("Non");
}
// text1DivSection4.classList.remove("hidden");
// text1DivSection4.classList.add("display");
console.log("Non");
};
text1DivSection4.classList.remove("hidden");
text1DivSection4.classList.add("display");
});

btnHidden2.addEventListener('click', () => {
imageBtnHidden2.setAttribute("src", "/images/display.png");
if(text2DivSection4.style.visibility === 'visible'){
console.log("Oui");
}else{
console.log("Non");
};
text2DivSection4.classList.remove("hidden");
text2DivSection4.classList.add("display");
});

btnHidden3.addEventListener('click', () => {
if(text3DivSection4.style.visibility === 'visible'){
console.log("Oui");
}else{
console.log("Non");
};
imageBtnHidden3.setAttribute("src", "/images/display.png");
text3DivSection4.classList.remove("hidden");
text3DivSection4.classList.add("display");
Expand Down

0 comments on commit abae47d

Please sign in to comment.