1(function ($) { 2 $(document).ready(function () { 3 $.fn.customTabs = function () { 4 this.each(function () { 5 const $tabContainer = $(this); 6 const $tabTitles = $tabContainer.find('.tab_title'); 7 const $tabContents = $tabContainer.find('.college_tabs_tab'); 8 9 $tabTitles.click(function () { 10 const target = $(this).data('target'); 11 const value = $(this).text(); 12 $('.college_tabs_active_item').removeClass('hide').addClass('show'); 13 $('.college_tabs_inactive_item').addClass('hide').removeClass('show'); 14 $('.college_tabs_active_item .tab_title').text(value) 15 if (target) { 16 // Remove 'active' class from all tab titles and contents 17 $tabTitles.removeClass('active'); 18 $tabContents.removeClass('active'); 19 20 // Add 'active' class to the clicked tab title and the corresponding tab content 21 $(this).addClass('active'); 22 $('#' + target).addClass('active'); 23 } 24 }); 25 }); 26 27 return this; 28 }; 29 30 // Usage example 31 $(document).ready(function () { 32 $('.main-tabs-wrp').customTabs(); 33 }); 34 35 $('.college_tabs_active_item').click(function () { 36 $('.college_tabs_active_item').removeClass('show').addClass('hide'); 37 $('.college_tabs_inactive_item').addClass('show').removeClass('hide'); 38 }) 39 40 }); 41 42 43})(jQuery);
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.