title: HTML Knockout radio button to call function
body: <p>I am using knockout to loop around an array to display a list of radio buttons with labels, and I want it so that whenever a radio button is selected it then calls function <code>onInputChange</code>.</p>
  
  <p>My current code is:</p>
  
  <pre><code>&lt;p data-bind="foreach:properties"&gt;
      &lt;br&gt;
      &lt;input name="filter" type="radio" data-bind="checked:$root.sortType, event:$root.onInputChange"&gt;
      &lt;label for="filter" data-bind="text:id"&gt;&lt;/label&gt;
      &lt;br&gt;
  &lt;/p&gt;
  </code></pre>