javascript - Conditional binding of method to drop down in jquery -


i have dropdown , function display progress bar. have bind function dropdown using jquery, working fine. problem is, want display progress bar if post occurs, showing when select option in drop down. have tried give condition on attribute not working. html code is.

<table>      <tr>         <td>perspective :</td>         <td>             <asp:dropdownlist id="ddlsearchperspective" runat="server" autopostback="true" onselectedindexchanged="ddlsearchperspective_selectedindexchanged" width="300px"></asp:dropdownlist>         </td>      </tr>      <tr>         <td>kra :</td>         <td>            <asp:dropdownlist id="ddlsearchkra" runat="server" width="300px"></asp:dropdownlist>         </td>      </tr> </table>   $(document).ready('select').change(function (event) {         var chg = $(this).attr('onchange');                    if (chg != "" && chg != null) {             showprogress();         }     }); 

$(document).ready not accept selector. want this

$(document).ready(function() {   $("select").change(function(event) {     // ...   }); }); 

Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -