vendredi 26 avril 2019

How to make function for tag with if statements work? (function name is never read)

I'm working on a navigation through i tags acting as buttons, sliding content around.

My function to perform the slide, through an onclick, does not work due to the function name not responding/being found.

HTML

<div onclick="prevPage()">
     <i class="fas fa-step-backward"></i>
</div>

JavaScript

function prevPage(){
     if (document.getElementsById("pageAbout").classList.contains('centered'))
}

Aucun commentaire:

Enregistrer un commentaire