title: Why jquery "change" event does not work in my example?
body: <p>When a <code>[name=&quot;tip&quot;]</code> has the first value, display a specific element, otherwise it would display another element.</p>
  <p>Both elements have the <code>display:none</code> property. When I load the page I check the select value and fadeIn the desired element automatically.</p>
  <p>Everything works fine except when I try to change the selected option: nothing happens. I added both javascript <code>onchange</code> to that item and jquery <code>.change()</code> and nothing happens. Can you tell me why it does not work in my example?</p>
  <pre><code>&lt;form id=&quot;fm-account-properties-tab&quot; method=&quot;POST&quot;&gt;
  &lt;table width=&quot;300px&quot; style=&quot;margin-top:10px;&quot; align=&quot;center&quot; &gt;
  
      &lt;tr&gt;
          
          &lt;td align=&quot;left&quot;&gt;
          &lt;select class=&quot;easyui-combobox&quot; name=&quot;tip&quot; style=&quot;width:200px;&quot; class=&quot;easyui-validatebox&quot; required=&quot;true&quot; onchange=&quot;changeType();&quot;&gt;
                      &lt;option value=&quot;l1&quot;&gt;l1&lt;/option&gt;
                      &lt;option value=&quot;l2&quot;&gt;l2&lt;/option&gt;
                      &lt;script&gt;
                          $(document).ready(function(){
                              $('[name=&quot;tip&quot;]').val('&lt;?php echo $a['tip'];?&gt;');
                          });
                      &lt;/script&gt;
          &lt;/select&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr id=&quot;l1&quot; style=&quot;display:none&quot;&gt;
  
          &lt;td align=&quot;left&quot;&gt;
          &lt;select class=&quot;easyui-combobox&quot; name=&quot;l1&quot;  style=&quot;width:200px;&quot; class=&quot;easyui-validatebox&quot; required=&quot;true&quot;&gt;
                      
          &lt;/select&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr id=&quot;l2&quot; style=&quot;display:none&quot;&gt;
  
          &lt;td align=&quot;left&quot;&gt;
          &lt;select class=&quot;easyui-combobox&quot; name=&quot;l2&quot;  style=&quot;width:200px;&quot; class=&quot;easyui-validatebox&quot;&gt;
                      
                      
          &lt;/select&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  
  &lt;script&gt;
  function changeType()
  {
  
  if($('[name=&quot;tip&quot;]').val()=='l1')
      {
      $('#l1').fadeIn();
      $('#l2').hide();
      }
  else
      {
      $('#l2').fadeIn();
      $('#l1').hide();
      }
  }
  
  
  
  $(document).ready( function () {
          
          changeType();
  
              $('[name=&quot;tip&quot;]').change(function(){ alert('1');});//it never alerts me
      });
  </code></pre>