Why content of coreui.io navs-tabs is not changed clicking on header? #599
Unanswered
sergeynilov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In laravel 8/jquery 3.6 / @coreui/coreui 3.4.0 app I need to add tab on my form - I opened the page https://coreui.io/docs/components/navs-tabs/
and copypasted tab code
I changed content of tabs like : “Tab 1...” - to see which tab is now opened.
But clicking on header of any tab content is not changed: https://prnt.sc/_70HzmoWLFk6
Looking at methods at page https://coreui.io/docs/components/navs-tabs/#events I see example :
I remade my html and javascript code :
By default 1st tab is opened and I try by clicking on “Profile” tab to open “Tab 2b” content with id="tabContentProfile" :
But I got error :
What I see in browser's console : https://prnt.sc/Xi2c4xguugp6
Tab header is selected, but not content area...
I suppose I need to convert tabContentElement element into coreui class, similar I made with method above :
new coreui.Tab(triggerEl)
But I did not find any similar method...
Not sure if that is correct way and why nav-tabs does not work by default without any JS code ?
Do I really need JS code in this case?
Beta Was this translation helpful? Give feedback.
All reactions