jquery tab click event code example
Example 1: bootstrap tabs click event jquery
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var target = $(e.target).attr("href") // activated tab
alert(target);
});
Example 2: onswitch from tab do something jquery
$(window).blur(function(e) {
alert('You have moved from this tab/window.');
});