79098703

Date: 2024-10-17 15:07:43
Score: 1.5
Natty:
Report link

Using querySelector is generally okay. But it's important to consider the following: if one day you decide to rewrite your classes, as is common during a layout redesign, the changes might break your scripts. I recently had this issue. Now I understand the advantage of using getElementById whenever possible. And at the CSS level, using classes instead of IDs.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Peristilo peris