https://vanillawebdev.blogspot.com/2025/01/widget-elements-css.html
https://vanillawebdev.blogspot.com/2024/11/console-log-snippet.html
https://vanillawebdev.blogspot.com/2024/11/console-log-snippet.html?max-results=20
https://vanillawebdev.blogspot.com/
user_r100
//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizihHpchmJoGeEVuJGCATZpHw9BgxolQLkV-Mw0hXTuIjdZQ8e_AeFQZdY6r5UrGWerl4b3Qx4aYsVx2w9y474FJvlyZDZiNcCLLNNQly7M3NZ8Xz1g2dsxQh3yuQJln2e6JTJtzci506US-j64gEDelPT-QYo7_TFH1kTp6AapPzrZQ/s220/channels4_profile.jpg
4389579429597541694
https://vanillawebdev.blogspot.com/2025/01/css-classname-in-js.html
CSS Class Name That's Mean to be Accessed in JavaScript
January 22, 2025
2025
January
22
05:40 PM
You may want to use underscore (_) prefix for class names which element is being referenced in JavaScript.
[in type="text" ._inputUsername]
<script>
let username = document.querySelector('._inputUsername');
console.log(username);
</script>
Now you can tell at a glance that the class is being used somewhere in the JS files, and that it should not be renamed nor removed without checking the JS.
You can still use them for styling, of course.
https://www.blogger.com/rpc_relay.html
https://www.blogger.com/comment/frame/8166404610182826392?po=4389579429597541694&hl=en&saa=85391&origin=https://vanillawebdev.blogspot.com&skin=contempo
https://vanillawebdev.blogspot.com/2025/01/css-classname-in-js.html#comments
true
["@lvc","coding-tips","css-tips"]
https://vanillawebdev.blogspot.com/search/label/%40lvc
@lvc
https://vanillawebdev.blogspot.com/search/label/coding-tips
coding-tips
https://vanillawebdev.blogspot.com/search/label/css-tips
css-tips
https://vanillawebdev.blogspot.com/2025/01/widget-elements-css.html
https://vanillawebdev.blogspot.com/2024/11/console-log-snippet.html
https://vanillawebdev.blogspot.com/