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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -