SkyCaptainXIII said: Still confused about how clicking the button adds and removes the css class. There's no onclick I can see or checked/selected in the css unless I'm blind. Is it controlled via a script we don't have access to? onClick event listeners do not need to be set at the HTML level. Both of these are equally valid: <script type="text/javascript"> function exampleClicked() { alert('example button clicked'); } window.onload = function () { var button = document.getElementById('example'); button.onclick = exampleClicked; } </script> ... <button id="example">Example Button</button> <script type="text/javascript"> function exampleClicked() { alert('example button clicked'); } </script> ... <button id="example" onclick="exampleClicked()">Example Button</button> The former is preferred, as it separates content from behavior. Further, libraries like jQuery (which Roll20 uses) make the first version even easier to write. However, since the .editmode behavior is black-boxed to you, does it really matter how the class is applied? I should think it matters more that the class is applied. However, for completeness's sake, without actually looking at the Roll20 source, it's going to look something like this: $(function() { $('.repcontrol_edit').click(function(e) { var repcontainer = $(this).parent().prev(); e.preventDefault(); if ($(this).text() === 'Modify') { $(this).text('Done') // change button text .next().hide(); // hide add button repcontainer.addClass('editmode'); } else { $(this).text('Modify') .next().show(); repcontainer.removeClass('editmode'); } }); }); SkyCaptainXIII said: Basically I just want to see if editmode is active, and if it is... add a width 100% to the macro box division I'm using to hold the repeating macro buttons. I also need to add position relative to itemcontrol. .repcontainer[data-groupname=repeating_Example].editmode .itemcontrol { position: relative; } .repcontainer[data-groupname=repeating_Example].editmode .sheet-macro-box-division { width: 100%; }