prevent click other tab bootstrap tabs

Solutions on MaxInterview for prevent click other tab bootstrap tabs by the best coders in the world

showing results for - "prevent click other tab bootstrap tabs"
Max
06 Jan 2017
1<ul class="nav nav-tabs" id="createNotTab">
2    <li class="active" ><a href="#home" data-toggle="tab">Step 1: Select Property</a></li>
3    <li class="disabled"><a href="#createnotification" data-toggle="" >Step 2: Create Notification</a></li>
4</ul>
5
Dot
01 Mar 2017
1<button class="btn btn-warning prevtab" type="button" onclick="return showPrev()"><span class="glyphicon glyphicon-arrow-left"></span>Previous </button>
2 <button class="btn btn-info prevtab" type="button" onclick="return showNext()"><span class="glyphicon glyphicon-arrow-right"></span>Next </button>
3
Anjali
11 Aug 2017
1 var $tabs = $('#createNotTab li');
2
3
4function showPrev() {
5    $tabs.filter('.active').prev('li').removeClass("disabled");
6    $tabs.filter('.active').prev('li').find('a[data-toggle]').each(function () {
7       $(this).attr("data-toggle", "tab");
8    });
9
10    $tabs.filter('.active').prev('li').find('a[data-toggle="tab"]').tab('show');
11
12    $tabs.filter('.active').next('li').find('a[data-toggle="tab"]').each(function () {
13        $(this).attr("data-toggle", "").parent('li').addClass("disabled");        
14    })
15}
16
17function showNext() {
18    $tabs.filter('.active').next('li').removeClass("disabled");
19    $tabs.filter('.active').next('li').find('a[data-toggle]').each(function () {
20        $(this).attr("data-toggle", "tab");
21    });
22
23    $tabs.filter('.active').next('li').find('a[data-toggle="tab"]').tab('show');
24
25    $tabs.filter('.active').prev('li').find('a[data-toggle="tab"]').each(function () {
26        $(this).attr("data-toggle", "").parent('li').addClass("disabled");;        
27    })
28}
29