title: unable to call onChange event on select box
body: <p>I have table structure like this below html code. Here i have a selectbox which is populated on page load from my database, i have given a inline function on the selectbox in order to call if user changes the selectbox value.. but its not calling the jquery function onChange of selectbox .. Please can you see why?</p>
  
  <p><a href="http://jsfiddle.net/7TMrc/" rel="nofollow">FIDDLE</a></p>
  
  <p>My jquery: </p>
  
  <pre><code> $(document).ready(function() { 
                $.fn.ActivityOptionChange = function(id) {  
                    alert("test"); 
              };
        ....
        ....
  </code></pre>
  
  <p>Html</p>
  
  <pre><code>&lt;table cellspacing="0" class="table table-condensed TF" style="width: 100%;" id="table6"&gt;
     &lt;tbody&gt;
        &lt;tr class="fltrow"&gt;
           &lt;td&gt;&lt;input id="flt0_table6" type="hidden" ct="0" class="flt"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;input id="flt1_table6" type="hidden" ct="1" class="flt"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;input id="flt2_table6" type="hidden" ct="2" class="flt"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;input id="flt3_table6" type="hidden" ct="3" class="flt"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;input id="flt4_table6" type="hidden" ct="4" class="flt"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;input id="flt5_table6" type="hidden" ct="5" class="flt"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;input id="flt6_table6" type="hidden" ct="6" class="flt"&gt;&lt;/td&gt;
           &lt;td&gt;&lt;input id="flt7_table6" type="hidden" ct="7" class="flt"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr class="success"&gt;
           &lt;td style="width: 15%;"&gt;S.no&lt;/td&gt;
           &lt;td style="width: 15%;"&gt;Activity Name&lt;/td&gt;
           &lt;td style="width: 5%;"&gt;Activity Option&lt;/td&gt;
           &lt;td style="width: 5%;"&gt;Time(HR:MIN)&lt;/td&gt;
           &lt;td style="width:10%;"&gt;cals&lt;/td&gt;
           &lt;td style="width: 5%;"&gt;distance&lt;/td&gt;
           &lt;td style="width: 5%;"&gt;Unit&lt;/td&gt;
           &lt;td style="width: 15%;"&gt;Submit&lt;/td&gt;
        &lt;/tr&gt;
        &lt;form method="post" action="/tbft/webapp/logs/insertAcitivity" id="formid44"&gt;&lt;/form&gt;
        &lt;tr id="formrowid44" class=" odd"&gt;
           &lt;td style="width:5%;"&gt;1&lt;/td&gt;
           &lt;td style="width:25%;" class="text-capitalize"&gt;&lt;a href="localhost/tbft/webapp/index.php/logs/activity/44/43"&gt;bicycling, BMX or mountain&lt;/a&gt;&lt;/td&gt;
           &lt;td style="width:25%;" class="text-capitalize"&gt;-&lt;/td&gt;
           &lt;td style="width:15%;" class="text-capitalize"&gt;
              &lt;div style="display:inline-flex;"&gt;&lt;input maxlength="2" id="time-hr-id44" name="timeHrTxt" size="2" type="text" style="width:25px;text-align:center;" value="00" onkeyup="$(this).CalculateCalorie(44);" placeholder=" HR"&gt; : &lt;input onkeyup="$(this).CalculateCalorie(44);" id="time-min-id44" name="timeMinTxt" placeholder=" MIN" type="text" style="width:25px;text-align:center;" maxlength="2" size="2" value="00"&gt;&lt;/div&gt;
           &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;&lt;input type="text" style="display:none;" name="metsTxt" id="mets-id44" value="8.5"&gt;&lt;span id="cals-id44" class="cals"&gt;0.00&lt;/span&gt;&lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt; &lt;input name="distanceTxt" id="distance-Id44" type="text" style="width:50px;text-align:center;"&gt; &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;
  
           &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;  &lt;button onclick="$(this).SubmitForm(44);" class="btn btn-success" type="button"&gt;
              &lt;span class="glyphicon glyphicon-plus"&gt;&lt;/span&gt;
              &lt;/button&gt;
           &lt;/td&gt;
        &lt;/tr&gt;
        &lt;form method="post" action="/tbft/webapp/logs/insertAcitivity" id="formid45"&gt;&lt;/form&gt;
        &lt;tr id="formrowid45" class=" even"&gt;
           &lt;td style="width:5%;"&gt;2&lt;/td&gt;
           &lt;td style="width:25%;" class="text-capitalize"&gt;&lt;a href="localhost/tbft/webapp/index.php/logs/activity/45/43"&gt;bicycling/biking&lt;/a&gt;&lt;/td&gt;
           &lt;td style="width:25%;" class="text-capitalize"&gt;
              &lt;select name="activity_option_id" class="selectbox" onchange="$(this).ActivityOptionChange(45)" id="activity-opn-Id45"&gt;
                 &lt;option value="45_4.0"&gt;10 mph or less&lt;/option&gt;
                 &lt;option value="47_6.0"&gt;10-11.9 mph, leisure, slow, light effort&lt;/option&gt;
                 &lt;option value="46_8.0"&gt;general&lt;/option&gt;
                 &lt;option value="48_16"&gt;greater then 20 mph, racing, not drafting&lt;/option&gt;
              &lt;/select&gt;
           &lt;/td&gt;
           &lt;td style="width:15%;" class="text-capitalize"&gt;
              &lt;div style="display:inline-flex;"&gt;&lt;input maxlength="2" id="time-hr-id45" name="timeHrTxt" size="2" type="text" style="width:25px;text-align:center;" value="00" onkeyup="$(this).CalculateCalorie(45);" placeholder=" HR"&gt; : &lt;input onkeyup="$(this).CalculateCalorie(45);" id="time-min-id45" name="timeMinTxt" placeholder=" MIN" type="text" style="width:25px;text-align:center;" maxlength="2" size="2" value="00"&gt;&lt;/div&gt;
           &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;&lt;input type="text" style="display:none;" name="metsTxt" id="mets-id45" value="4.0"&gt;&lt;span id="cals-id45" class="cals"&gt;0.00&lt;/span&gt;&lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt; &lt;input name="distanceTxt" id="distance-Id45" type="text" style="width:50px;text-align:center;"&gt; &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;
              -
           &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;  &lt;button onclick="$(this).SubmitForm(45);" class="btn btn-success" type="button"&gt;
              &lt;span class="glyphicon glyphicon-plus"&gt;&lt;/span&gt;
              &lt;/button&gt;
           &lt;/td&gt;
        &lt;/tr&gt;
        &lt;form method="post" action="/tbft/webapp/logs/insertAcitivity" id="formid49"&gt;&lt;/form&gt;
        &lt;tr id="formrowid49" class=" odd"&gt;
           &lt;td style="width:5%;"&gt;3&lt;/td&gt;
           &lt;td style="width:25%;" class="text-capitalize"&gt;&lt;a href="localhost/tbft/webapp/index.php/logs/activity/49/43"&gt;unicycling&lt;/a&gt;&lt;/td&gt;
           &lt;td style="width:25%;" class="text-capitalize"&gt;-&lt;/td&gt;
           &lt;td style="width:15%;" class="text-capitalize"&gt;
              &lt;div style="display:inline-flex;"&gt;&lt;input maxlength="2" id="time-hr-id49" name="timeHrTxt" size="2" type="text" style="width:25px;text-align:center;" value="00" onkeyup="$(this).CalculateCalorie(49);" placeholder=" HR"&gt; : &lt;input onkeyup="$(this).CalculateCalorie(49);" id="time-min-id49" name="timeMinTxt" placeholder=" MIN" type="text" style="width:25px;text-align:center;" maxlength="2" size="2" value="00"&gt;&lt;/div&gt;
           &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;&lt;input type="text" style="display:none;" name="metsTxt" id="mets-id49" value="5.0"&gt;&lt;span id="cals-id49" class="cals"&gt;0.00&lt;/span&gt;&lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt; &lt;input name="distanceTxt" id="distance-Id49" type="text" style="width:50px;text-align:center;"&gt; &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;
  
           &lt;/td&gt;
           &lt;td style="width:5%;" class="text-capitalize"&gt;  &lt;button onclick="$(this).SubmitForm(49);" class="btn btn-success" type="button"&gt;
              &lt;span class="glyphicon glyphicon-plus"&gt;&lt;/span&gt;
              &lt;/button&gt;
           &lt;/td&gt;
        &lt;/tr&gt;
     &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>