diff --git a/site/content/docs/5.0/components/navs.md b/site/content/docs/5.0/components/navs.md index a52a11adc8ad..b311b9ab57da 100644 --- a/site/content/docs/5.0/components/navs.md +++ b/site/content/docs/5.0/components/navs.md @@ -521,6 +521,17 @@ You can activate a tab or pill navigation without writing any JavaScript by simp {{< /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):