mirror of
https://github.com/safing/web
synced 2025-04-16 17:09:09 +00:00
15 lines
No EOL
531 B
JavaScript
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');
|
|
}
|
|
});
|
|
});
|
|
}); |