title: Call function on click on Bootstrap toggle (checkbox)
body: <p>I want to call a function <code>updateText()</code> when I click on the checkbox <code>text_mode</code>. I've tried using <code>onClick="updateText()"</code> but it didn't work. I have read some comments on similar questions, but all answers are using jQuery, can I do it without using any libraries, because all the js code for this project is done without any libraries?</p>
  
  <p>This is the checkbox:</p>
  
  <pre><code>&lt;label class="checkbox-inline"&gt;
     &lt;input type="checkbox" checked data-toggle="toggle" data-size="mini" data-onstyle="default" id="text_mode" onclick="updateText()"&gt;
  &lt;/label&gt;
  </code></pre>