1$(document).ready(function () { 2 $('.simple-tab').each((index, tabCtrl) => { 3 // Add the "standalone-tabs" class to a .simple-tab root element to make it 4 // operate independently of any other tab sets in the same .main-section. 5 var syncTabs = !$(tabCtrl).hasClass('standalone-tabs'); 6 7 $(tabCtrl).find('.tablink').each((index, tabLink) => { 8 $(tabLink).on('click', function (evt) { 9 evt.preventDefault(); 10 11 // Handle the buttons first 12 $(tabCtrl).find('.tablink.active').removeClass('active'); 13 if (syncTabs) { $(tabCtrl).closest('.main-section').find('.simple-tab:not(.standalone-tabs) .tablink.active').removeClass('active'); } 14 $(tabLink).addClass('active'); 15 16 var id = index; 17 var active = $(tabCtrl).find('.tabcontent.active'); 18 if (syncTabs) { active = $(tabCtrl).closest('.main-section').find('.simple-tab:not(.standalone-tabs) .tabcontent.active'); } 19 if (active.length !== 0 && active[0] != $(tabCtrl).find('.tabcontent')[id]) { 20 $(active).removeClass('active'); 21 } 22 $($(tabCtrl).find('.tabcontent')[id]).addClass('active'); 23 24 if ($(tabCtrl).find('.tabcontent.active').length === 0) { 25 $(tabCtrl).find('.tablink.active').removeClass('active'); 26 } 27 28 return false; 29 }); 30 }); 31 }); 32});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.