Dark Mode with CSS and JavaScript

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 7

  • @tqaquotes9379
    @tqaquotes9379 Рік тому +1

    Legend of JavaScript 👍

    • @OpenJavaScript
      @OpenJavaScript  Рік тому

      Not sure I qualify as a legend but I'm very glad you liked this video :)

  • @viniciusm.m.7822
    @viniciusm.m.7822 Рік тому

    Awesome, man!
    Thanks!!

    • @OpenJavaScript
      @OpenJavaScript  Рік тому +1

      You're welcome Vinicius, glad you liked it (and nice to hear from you again!)

    • @viniciusm.m.7822
      @viniciusm.m.7822 Рік тому

      @@OpenJavaScript i learn a lot from you!
      By the way, I'm looking for work as trainee in JS. I have 4 months of experience, 2 individual projects and intermediate English, if you can help me please! Haha

  • @elephant313
    @elephant313 Рік тому +1

    Thanks for sharing free education knowledge! I have something to say that i can use the same thing with JS toggle() and i found that very useful and it's easy to code with it
    should i go with my own code or ur has something more to offer again thank you. waiting for response

    • @OpenJavaScript
      @OpenJavaScript  Рік тому +1

      Is that a library? Or a different way using the classList.toggle("") method?
      If it's a library, I'd consider the size of the library vs the code here and use the one that is less weighty. Unless the library is doing something for you that the example here is not.
      Also, performance tip if you implement the example here: the JS code before the that sets the CSS class on the documentElement should either be bundled with any other code that you have before the to prevent multiple HTTP requests for different scripts. If it's the only code before the , because it's only a few lines, you may want to include it an inline script to prevent a request for just a few lines of code (as it is implemented in the video).