How ot remove a jquery function from textbox using jquery -
How ot remove a jquery function from textbox using jquery -
i have asp.net textbox assign datepicker when search alternative date, want unbind datepicker function when search alternative changes else other date. below code.
$("#<%=ddlsearchby.clientid%>").change(function () { var cbovalue = $("#<%=ddlsearchby.clientid%>").find("option:selected").text(); if (cbovalue == "date") { $("#<%=txtsearchby.clientid%>").datepicker(); } else { $("#<%=txtsearchby.clientid%>").removedata("datepicker"); } });
here don't know in else part of alter event. googled alot problem did not find solutions. if can help me
datepicker
has "method" that:
$("#<%=txtsearchby.clientid%>").datepicker("destroy");
you can find in the documentation.
jquery
Comments
Post a Comment