Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

prevent click other tab bootstrap tabs

 var $tabs = $('#createNotTab li');


function showPrev() {
    $tabs.filter('.active').prev('li').removeClass("disabled");
    $tabs.filter('.active').prev('li').find('a[data-toggle]').each(function () {
       $(this).attr("data-toggle", "tab");
    });

    $tabs.filter('.active').prev('li').find('a[data-toggle="tab"]').tab('show');

    $tabs.filter('.active').next('li').find('a[data-toggle="tab"]').each(function () {
        $(this).attr("data-toggle", "").parent('li').addClass("disabled");        
    })
}

function showNext() {
    $tabs.filter('.active').next('li').removeClass("disabled");
    $tabs.filter('.active').next('li').find('a[data-toggle]').each(function () {
        $(this).attr("data-toggle", "tab");
    });

    $tabs.filter('.active').next('li').find('a[data-toggle="tab"]').tab('show');

    $tabs.filter('.active').prev('li').find('a[data-toggle="tab"]').each(function () {
        $(this).attr("data-toggle", "").parent('li').addClass("disabled");;        
    })
}
Comment

prevent click other tab bootstrap tabs

<ul class="nav nav-tabs" id="createNotTab">
    <li class="active" ><a href="#home" data-toggle="tab">Step 1: Select Property</a></li>
    <li class="disabled"><a href="#createnotification" data-toggle="" >Step 2: Create Notification</a></li>
</ul>
Comment

prevent click other tab bootstrap tabs

<button class="btn btn-warning prevtab" type="button" onclick="return showPrev()"><span class="glyphicon glyphicon-arrow-left"></span>Previous </button>
 <button class="btn btn-info prevtab" type="button" onclick="return showNext()"><span class="glyphicon glyphicon-arrow-right"></span>Next </button>
Comment

PREVIOUS NEXT
Code Example
Javascript :: range in javascript 
Javascript :: trim text after a certain word in js 
Javascript :: tab key event in angular 
Javascript :: nuxt auth keep user loggedin on refresh 
Javascript :: next js environment variables 
Javascript :: JavaScript next() Method 
Javascript :: nodejs heap usage 
Javascript :: react native tab navigation header 
Javascript :: string substring last 3 and first character 
Javascript :: promise in javascript 
Javascript :: vue js readdir 
Javascript :: Beautifule JS Console Log 
Javascript :: get bytes from string javascript 
Javascript :: prevent onclick event javascript 
Javascript :: javascript inbuilt funcctions to match the word and return boolean 
Javascript :: lodash isempty 
Javascript :: javascript array from string 
Javascript :: delete element from array js 
Javascript :: vue 3 apollo client 
Javascript :: flatten json python 
Javascript :: forever.js 
Javascript :: react native swiper 
Javascript :: normalize js 
Javascript :: react 
Javascript :: background colour in react 
Javascript :: import and export type in js 
Javascript :: get yyyy-mm-dd hh:mm from date javascript 
Javascript :: javascript last character of a string 
Javascript :: string theory 
Javascript :: Correct regex for extracting URl 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =