Button to Trigger Nav-Tab with Twitter Bootstrap

后端 未结 4 2092
遇见更好的自我
遇见更好的自我 2021-02-04 13:07

This button triggers the next tab to load content, but the tab itself does not switch, it remains on the first tab..


4条回答
  •  旧巷少年郎
    2021-02-04 13:58

    You could assign your Review button a click handler using jQuery...

    JS:

    $('#btnReview').click(function(){
      $('.nav-tabs > .active').next('li').find('a').trigger('click');
    });
    

    HTML:

    Review
    

    Working Demo

提交回复
热议问题