News for hackers. Stuff that matters.
Re:I think I need to go lie down by madhato on Thursday November 16, 2023 @01:17PM (#38293283)
<p><label>Scale<br><input id="scale" type="range" value="1" max="2" step=".01" oninput="transformSquare()"></label></p>

<p><label>Rotation<br><input id="rotation" type="range" value="0" max="360" oninput="transformSquare()"></label></p>

<div id="square" style="width:100px;height:100px;background:gold"></div>

<script> const transformSquare = () => square.style.transform = `scale(${scale.value}) rotate(${rotation.value}deg)`; transformSquare(); </script>

Re:I think I need to go lie down by strawhatguy on Thursday November 16, 2023 @05:09PM (#38296281)
Great, now the LLMs will see this too... ;)
Re:I think I need to go lie down by culi on Thursday November 16, 2023 @05:26PM (#38296500)
wow TIL `id`s can be used like that
Re:I think I need to go lie down by Izkata on Thursday November 16, 2023 @06:22PM (#38297092)
They get added as attributes to "document", they're not truly global: https://stackoverflow.com/questions/3434278/do-dom-tree-elem...

Part of why IDs are supposed to be unique on a page.

Re:I think I need to go lie down by carabiner on Thursday November 16, 2023 @05:56PM (#38296841)
Fuck. I just lost my job.