helpcenter/Web/js/help/tableofcontents.min.js
alexandervnuchkov 71f171fb08 First commit
2016-08-29 16:51:20 +03:00

1 line
952 B
JavaScript

$(function(){$(".gs_link").click(function(){var letter=$(this).attr("id");$(".gs_link").removeClass("gs_active"),$(this).addClass("gs_active"),"all"==letter?($(".gs_content").show(),$(".backtotop").show()):($(".gs_content").hide(),$("#"+letter+"_block").show())}),$(".see_also").click(function(){for(var allBlock=!0,blocks=$(".gs_content"),i=0;i<blocks.length;i++)"none"==$(blocks[i]).css("display")&&(allBlock=!1);if(!allBlock){var firstLetter=$(this).text().charAt(0).toLowerCase();$(".gs_content").hide(),$("#gs_"+firstLetter+"_block").show(),$(".gs_link").removeClass("gs_active"),$("#gs_"+firstLetter).addClass("gs_active")}}),$(".PortalHelp a[href^='#']").click(function(){var block=$(this).attr("href"),secondPart=block.split("__")[1];$(".gs_link").removeClass("gs_active"),$(block.split("_")[0]).addClass("gs_active"),$(".gs_content").hide(),secondPart?($(block.split("__")[0]).show(),document.location.hash="#"+secondPart):$(block).show()})});