mirror of
https://github.com/danbulant/api_docs
synced 2026-05-19 04:08:40 +00:00
19 lines
524 B
JavaScript
19 lines
524 B
JavaScript
function activateLanguage(language) {
|
|
$("#lang-selector a").removeClass('active');
|
|
$("#lang-selector a[data-language-name='" + language + "']").addClass('active');
|
|
$(".highlight").hide();
|
|
$(".highlight." + language).show();
|
|
$(".highlight.text").show(); // always show text
|
|
}
|
|
|
|
function setupLanguages(languages) {
|
|
currentLanguage = languages[0];
|
|
|
|
activateLanguage(languages[0]);
|
|
|
|
$("#lang-selector a").bind("click", function() {
|
|
activateLanguage($(this).data("language-name"));
|
|
return false;
|
|
});
|
|
|
|
}
|