title: Conditional binding of method to drop down in jquery
body: <p>I have dropdown and a function to display progress bar. I have bind the function to dropdown using jquery, its working fine. Problem is, i want to display the progress bar if post back occurs, But its showing always when i select option in any drop down. I have tried to give condition on attribute but its not working. My HTML code is.</p>
  
  <pre><code>&lt;table&gt;
       &lt;tr&gt;
          &lt;td&gt;Perspective :&lt;/td&gt;
          &lt;td&gt;
              &lt;asp:DropDownList ID="ddlSearchPerspective" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSearchPerspective_SelectedIndexChanged" Width="300px"&gt;&lt;/asp:DropDownList&gt;
          &lt;/td&gt;
       &lt;/tr&gt;
       &lt;tr&gt;
          &lt;td&gt;KRA :&lt;/td&gt;
          &lt;td&gt;
             &lt;asp:DropDownList ID="ddlSearchKRA" runat="server" Width="300px"&gt;&lt;/asp:DropDownList&gt;
          &lt;/td&gt;
       &lt;/tr&gt;
  &lt;/table&gt;
  
   $(document).ready('select').change(function (event) {
          var chg = $(this).attr('onchange');           
          if (chg != "" &amp;&amp; chg != null) {
              ShowProgress();
          }
      });
  </code></pre>