|
|
|
|
|
by ipaddr
867 days ago
|
|
Better and shorter syntax, plugins, ecosystem. Hide Show ``` $(".box").hide(); $(".box").show(); vs document.querySelector(".box").style.display = "none"; document.querySelector(".box").style.display = "block"; ```
Both work. The first is more clear |
|
const $ = document.querySelector.bind(document);
$('.box').hidden = true;
$('.box').hidden = false;
```