title: Change Text if checked - checkbox
body: <p>I have a checkbox with a explanatory Text:</p>
  
  <pre><code>&lt;%= f.label :is_company do %&gt;
    &lt;%= f.check_box :is_company %&gt;&amp;nbsp;&amp;nbsp; &lt;span&gt;Are you Representing a Company / Organization ?&lt;/span&gt;
  &lt;% end %&gt; 
  </code></pre>
  
  <p>I need to change the text (if checkbox is triggered) from <code>Are you Representing a Company / Organization ?</code> to <code>I'm representing a Company / Organization !</code></p>
  
  <p>Can anyone help me out ?</p>
  
  <p>HTML Output :</p>
  
  <pre><code>&lt;label for="user_is_company"&gt;
    &lt;input name="user[is_company]" type="hidden" value="0"&gt;
    &lt;input id="user_is_company" name="user[is_company]" type="checkbox" value="1"&gt;&amp;nbsp;&amp;nbsp; 
    &lt;span&gt;Are you Representing a Company / Organization ?&lt;/span&gt;
  &lt;/label&gt;
  </code></pre>
  
  <p>I work in <strong>coffeescript</strong></p>
  
  <p>So i made this abomination:</p>
  
  <pre><code>$(document).on "ready page:load", -&gt;
    check = -&gt;
      if input.checked
        document.getElementById("label_cmp").innerHTML = "I am representing a Company / Organization !"
      else
        document.getElementById("label_cmp").innerHTML = "Are you representing a Company / Organization ?"
    input = document.querySelector("input[type=checkbox]")
    input.onchange = check
    check()
  </code></pre>
  
  <p>but i think its a lot of code, for nothing...</p>