i have a content page, i write some jquery selectors after asp:updatepanel, for first time, when page loaded $(document).ready(function() works right, but after a postback, selectors doesnt work anymore, any way does exist to solve this problem??
<asp:content id="Content1" contentplaceholderid="contentplaceholder1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtdate" runat="server" CssClass="persianDTP" ></asp:TextBox>
<!-- some code -->
</ContentTemplate>
</asp:UpdatePanel>
<script>
$(document).ready(function () {
$('.PersianDTP').datepicker({
showOn: 'button',
buttonImage: 'calendar.png',
dateFormat: 'yy/mm/dd',
//appendText: ' (yy/mm/dd)',
changeMonth: true,
changeYear: true,
//selectOtherMonths: true,
//showOtherMonths: true,
showStatus: true,
showButtonPanel: true,
buttonImageOnly: true,
buttonText: 'Choose a Date',
onClose: function () {
this.focus();
}
});
jQuery(function ($) {
$(".PersianDTP").mask("9999/99/99");
});
});
</script>
</asp:content>