1
0
Fork 0
mirror of https://github.com/safing/web synced 2025-04-16 17:09:09 +00:00
safing-web/vendor/safingTailwind/docs/js/internal/tabs.js
2021-12-13 07:29:14 +01:00

15 lines
No EOL
531 B
JavaScript

$(document).ready(function() {
var tabs = $('ul.tabs');
tabs.each(function(i) {
var tab = $(this).find('> li > a');
tab.click(function(e) {
var contentLocation = $(this).attr('href');
if(contentLocation.charAt(0)=="#") {
e.preventDefault();
tab.removeClass('active');
$(this).addClass('active');
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
}
});
});
});