fix indexing

fix indexing
This commit is contained in:
suman 2024-10-01 18:41:44 +05:30
parent fa81838993
commit efc97a048e

View file

@ -71,12 +71,8 @@
{ element: '#icon-32', href: { dark: './icons/light-favicon-32x32.png' } }
])
</script>
</head>
<body>
<h1>Water.css</h1>
<!-- toggle dark-mode -->
<div id="theme-container" aria-label="Toggle dark mode">
@ -86,10 +82,10 @@
</div>
<script>
const themeToggleButton = document.getElementById('theme-toggle')
const themeStylesheet = document.getElementById('js-stylesheet')
const themeIcon = document.getElementById('themeIcon')
// Toggle between dark and light themes
themeToggleButton.addEventListener('click', () => {
const themeStylesheet = document.getElementById('js-stylesheet')
const themeIcon = document.getElementById('themeIcon')
// Toggle between dark and light themes
themeToggleButton.addEventListener('click', () => {
const currentTheme = themeStylesheet.getAttribute('href')
if (currentTheme.includes('light.min.css')) {