From cbbef980dcb1e4a576b51f50ad7bf2560138b2f6 Mon Sep 17 00:00:00 2001 From: hafeoz <95505675+hafeoz@users.noreply.github.com> Date: Thu, 6 Jan 2022 09:26:20 +0000 Subject: [PATCH] Fixed switchers for "Changing the color" and "Changing the language" guides (#3435) * Update changing-the-language.md * Update changing-the-colors.md * Update changing-the-colors.md * Update changing-the-language.md --- docs/setup/changing-the-colors.md | 6 +++--- docs/setup/changing-the-language.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/setup/changing-the-colors.md b/docs/setup/changing-the-colors.md index e15ad02e1..1a2e142b5 100644 --- a/docs/setup/changing-the-colors.md +++ b/docs/setup/changing-the-colors.md @@ -44,7 +44,7 @@ Click on a tile to change the color scheme: button.addEventListener("click", function() { var attr = this.getAttribute("data-md-color-scheme") document.body.setAttribute("data-md-color-scheme", attr) - var name = document.querySelector("#__code_1 code span:nth-child(7)") + var name = document.querySelector("#__code_1 code span.l") name.textContent = attr }) }) @@ -99,7 +99,7 @@ Click on a tile to change the primary color: button.addEventListener("click", function() { var attr = this.getAttribute("data-md-color-primary") document.body.setAttribute("data-md-color-primary", attr) - var name = document.querySelector("#__code_2 code span:nth-child(7)") + var name = document.querySelector("#__code_2 code span.l") name.textContent = attr.replace("-", " ") }) }) @@ -156,7 +156,7 @@ Click on a tile to change the accent color: button.addEventListener("click", function() { var attr = this.getAttribute("data-md-color-accent") document.body.setAttribute("data-md-color-accent", attr) - var name = document.querySelector("#__code_3 code span:nth-child(7)") + var name = document.querySelector("#__code_3 code span.l") name.textContent = attr.replace("-", " ") }) }) diff --git a/docs/setup/changing-the-language.md b/docs/setup/changing-the-language.md index 1668c3a1e..930163dae 100644 --- a/docs/setup/changing-the-language.md +++ b/docs/setup/changing-the-language.md @@ -167,7 +167,7 @@ Click on a tile to change the directionality: button.addEventListener("click", function() { var attr = this.getAttribute("data-md-dir") document.body.dir = attr - var name = document.querySelector("#__code_3 code span:nth-child(5)") + var name = document.querySelector("#__code_3 code span.l") name.textContent = attr }) })