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 }) })