fullstack.web/swa/u/tabs.js

20 lines
430 B
JavaScript
Raw Permalink Normal View History

2022-12-22 06:57:51 +00:00
$(function (){
var $e = $(".tabs a").first();
$e.addClass("current")
showHideBlock( $e )
function showHideBlock($e){
$(".tabs-content .tab").hide()
var block = ".tabs-content .tab" + "." + $e.attr("name")
$(block).show()
}
$(".tabs a").click(function (){
$(".tabs a").removeClass("current")
$(this).addClass("current")
showHideBlock( $(this) )
})
})