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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -