Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2020-04-01 19:09:43 +00:00
parent 17c5596bc2
commit 9d4fcd35c0
17 changed files with 157 additions and 78 deletions

View File

@@ -86,7 +86,26 @@ function createSwitchItem(block, blockSwitch) {
return {'item': item, 'content': content};
}
function globalSwitch() {
$('.switch--item').each(function() {
$(this).off('click');
$(this).on('click', function() {
selectedText = $(this).text()
selectedIndex = $(this).index()
$(".switch--item").filter(function() { return ($(this).text() === selectedText) }).each(function() {
$(this).addClass('selected');
$(this).siblings().removeClass('selected');
selectedContent = $(this).parent().siblings(".content").eq(selectedIndex)
selectedContent.removeClass('hidden');
selectedContent.siblings().addClass('hidden');
});
});
});
}
$(addBlockSwitches);
$(globalSwitch);
</script>
</head>