Skip to content

Commit

Permalink
Example of using jQuery with tab navs
Browse files Browse the repository at this point in the history
  • Loading branch information
josephgeis committed Sep 25, 2020
1 parent 6c2abf3 commit db9f131
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions site/content/docs/5.0/components/navs.md
Expand Up @@ -521,6 +521,17 @@ You can activate a tab or pill navigation without writing any JavaScript by simp
</div>
{{< /highlight >}}

### Via jQuery

Enable tabbable tabs via JavaScript with jQuery:
{{< highlight js >}}
$('#myTab a').on('click', function(e){
var tabTrigger = new bootstrap.Tab(e.target)
e.preventDefault()
tabTrigger.show()
})
{{< /highlight >}}

### Via JavaScript

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):
Expand Down

0 comments on commit db9f131

Please sign in to comment.