title: jquery trigger click not working
body: <p>I am trying to trigger button click using a condition inside a JSP. Here is the code:</p>
  
  <pre><code>&lt;%      if(condition){
  %&gt;
              &lt;script&gt;
              $('#filter').val(&lt;dropdown value&gt;);
              $('#inputText').val("&lt;value&gt;");
              $("#buttonId").trigger('click');            
              &lt;/script&gt;       
          &lt;%}%&gt;   
  </code></pre>
  
  <p>I can see the dropdown value and input, but the button click event is not getting triggered. I am using Ajax to populate a table inside this button click handler.</p>
  
  <p>What could be wrong above...</p>