@@ -44,7 +44,7 @@ Click on a tile to change the color scheme:
4444 button.addEventListener("click", function() {
4545 var attr = this.getAttribute("data-md-color-scheme")
4646 document.body.setAttribute("data-md-color-scheme", attr)
47- var name = document.querySelector("#__code_1 code span:nth-child(7) ")
47+ var name = document.querySelector("#__code_1 code span.l ")
4848 name.textContent = attr
4949 })
5050 })
@@ -99,7 +99,7 @@ Click on a tile to change the primary color:
9999 button.addEventListener("click", function() {
100100 var attr = this.getAttribute("data-md-color-primary")
101101 document.body.setAttribute("data-md-color-primary", attr)
102- var name = document.querySelector("#__code_2 code span:nth-child(7) ")
102+ var name = document.querySelector("#__code_2 code span.l ")
103103 name.textContent = attr.replace("-", " ")
104104 })
105105 })
@@ -156,7 +156,7 @@ Click on a tile to change the accent color:
156156 button.addEventListener("click", function() {
157157 var attr = this.getAttribute("data-md-color-accent")
158158 document.body.setAttribute("data-md-color-accent", attr)
159- var name = document.querySelector("#__code_3 code span:nth-child(7) ")
159+ var name = document.querySelector("#__code_3 code span.l ")
160160 name.textContent = attr.replace("-", " ")
161161 })
162162 })
0 commit comments