helpcenter/helpcenter.r7-office.ru/Web/js/help/glossary.min.js

1 line
806 B
JavaScript
Raw Normal View History

$(function(){$(".gloss_link").click(function(){var letter=$(this).attr("id");$(".gloss_link").removeClass("gloss_active"),$(this).addClass("gloss_active"),"all"==letter?($(".gloss_content").show(),$(".backtotop").show()):($(".gloss_content").hide(),$(".backtotop").hide(),$("#"+letter+"_block").show())}),$(".see_also").click(function(){for(var allBlock=!0,blocks=$(".gloss_content"),i=0;i<blocks.length;i++)"none"==$(blocks[i]).css("display")&&(allBlock=!1);if(!allBlock)for(var firstLetter=$(this).text().charAt(0).toLowerCase(),letters=$(".gloss_link"),j=0;j<letters.length;j++)$(letters[j]).text().toLowerCase()==firstLetter&&($(".gloss_content").hide(),$("#"+$(letters[j]).attr("id")+"_block").show(),$(".gloss_link").removeClass("gloss_active"),$("#gloss_"+firstLetter).addClass("gloss_active"))})});