I am trying to call my function resultin a other function. Is there any way to do that? I attached an example.
Here is my function which I want to call it again, or reach the varaibale:
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var tab= $(e.target).attr("href");
})
In this function I want to reach the tab variable:
$( "#form" ).submit(function( event ) {
// I want to call the tab variable here
});
tabvariable outside and submit function in the same scope.$('.nav .active [a[data-toggle="tab"]')