there’s some javascript to make the tabs work, and a piece of it is to make one tab open by default. this doesn’t work, however the error is with a part of the code that IS working.
there’s some javascript to make the tabs work, and a piece of it is to make one tab open by default. this doesn’t work, however the error is with a part of the code that IS working.
Since you are using a
document.getElementById(...).click()
on the button with theopenTab
HOWEVER, theopenTab
function is not yet defined since it is under theclick()
which is why it throws that error. So you just need to use theclick()
below the declaration of the function. I would also not usethis
as an Id of an element sincethis
has a different use in JavaScript.Another possible way to fix your default is to probably just add the active class on the default one, and no need to click the button to set the default.
thank you so much!
i honestly forgot i changed the id to “this”, i was just changing it to random words hoping it would fix itself haha