I am currently facing a challenge in splitting a form into multiple tabs and encountering issues with the next and previous buttons on the second and third tabs.
My goal is for the tabs at the top to change state as you cycle through them by clicking the buttons.
I have set up a code pen and would appreciate any help from those who may know what I am doing wrong.
$('.btnNext').click(function() {
$('.nav-pills > .active').next('li').find('a').trigger('click');
});
$('.btnPrevious').click(function() {
$('.nav-pills > .active').prev('li').find('a').trigger('click');
});