Skip to content
Advertisement

Why this Tap function script is not working?

I want to put tap function in other content too but it is not working.

when you click tap on the top, each tap display proper content.

in there i want to put more content, so i made #Hometwo, #Newstwo, #Contacttwo, #Abouttwo

so when i clicked Home tap then it show #Home and #Hometwo text.

but it only works on #Home. why is it not working on “#Hometwo”?

what should i do to make it work on “#Hometwo” either??

any help will be so appreciated. thanks!

JavaScript
JavaScript
JavaScript

Advertisement

Answer

First your openPage function accepts three params, the third being the color:

JavaScript

But you’re passing 'Hometwo' for your third params on the clickevent. So either change that, or add a string to the display in your openPage function.

Here’s a working sample:

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement