20 lines
430 B
JavaScript
20 lines
430 B
JavaScript
|
$(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) )
|
||
|
})
|
||
|
})
|