I have server side button. First time jquery is working fine but next time jQuery not wroking. I am using jQuery inside Update Panel.
Below is my Jquery code.
<script type="text/javascript" src="../../js/jquery-ui-1.11.4.min.js"></script>
<script type="text/javascript">
(function ($) {
$('.mv-spinner').spinner(), $('.mv-action').button(),
$('.table-mv-vouchers').tooltip(), $('.table-mv-vouchers select').selectmenu()
})(jQuery)
</script>
Also I have used my code in page load function but not working.
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(typeof(UpdatePanel), "scrg", "<script type='text/javascript' src='../../js/jquery-ui-1.11.4.min.js'></script>");
Page.ClientScript.RegisterStartupScript(typeof(UpdatePanel), "scr", "<script type='text/javascript'> (function ($) { $('.mv-spinner').spinner(), $('.mv-action').button(), $('.table-mv-vouchers').tooltip(), $('.table-mv-vouchers select').selectmenu() })(jQuery) </script>");
}
How I will fix this issue? jQuery does not perform after postback. Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…