title: Storing the name of a radio button when checked, then removing it when it's cleared
body: <p>This is the HTML code I currently have:</p>
  
  <p><strong><a href="https://jsfiddle.net/8bw6vfwp/1/" rel="nofollow noreferrer">JSFiddle</a></strong></p>
  
  <pre><code>&lt;div class="container-cell col1 row1 component-sortable component-droppable ui-block-a" style="width:48%; text-align: left; vertical-align: top;" data-col="1" data-row="1"&gt;
    &lt;style&gt;
      label[for="checkbox-1"].ui-checkbox-on {}
  
      label[for="checkbox-1"].ui-checkbox-off {}
  
    &lt;/style&gt;
    &lt;div data-control-type="checkbox" data-control-id="checkbox-1" data-control-name="checkbox-1" data-object-column="A"&gt;
      &lt;input type="checkbox" name="checkbox-1" id="checkbox-1" data-theme="a"&gt;
      &lt;label for="checkbox-1" data-translatable="Noise [A]"&gt;Noise [A]&lt;/label&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>Is there a possible way I can have a global variable (say of var test;) then when the radio button is checked, store the name of the label as test = label; (for instance). Then when it's removed, it will call the variable and empty it as the box has now been unchecked?</p>
  
  <p>I've looked in to it a bit but can't find much, sorry for the basic q - I'm new to JS and taking on my own projects but seem to struggle with basic stuff.</p>