0

I have a Bootstrap nav set as nav-pills and trying to capture each time a tab is clicked using JQuery.

I cannot get the JQuery function to recognize each click.

I have a JSFiddle with the code I am using but cannot get the alert or console.log to fire - nothing appears: https://jsfiddle.net/dzeller44/fctxwwy0/

I followed this post: Bootstrap 3 jquery event for active tab change

I appreciate the help.

Dan
  • 940
  • 2
  • 14
  • 42

1 Answers1

1

it needs to be <a data-toggle="tab" instead of <a data-toggle="pill" or change the jquery section from $('a[data-toggle="tab"]') to $('a[data-toggle="pill"]') see the working fiddle here.

Muhammad Omer Aslam
  • 22,976
  • 9
  • 42
  • 68