This button triggers the next tab to load content, but the tab itself does not switch, it remains on the first tab..
Using Bootstrap 4
var nextTab; $('.nav-link').map(function(element) { if($(this).hasClass("active")) { nextTab = $(this).parent().next('li'); } }) nextTab.find('a').trigger('click');