2 jquery .click functions for one button . fire functions one after another
I have 2 jquery .click functions for one button. functions should fire one
after another. Second function not firing.
<asp:Button ID="Button1" runat="server" Text="Save" Width="70px" />
// this function is fired
$(document).ready(function () {
$("#<%=Button1.ClientID%>).click(function () {
//some code here
var con = confirm("message");
if (con) return true;
else return false;
});
});
// in another <script>
// this function is not getting fired
$(document).ready(function () {
$("#<%=Button1.ClientID%>").click(function () {
var con1 = confirm("message");
if (con1) {
return true;
} else {
return false;
}
}
});
});
how can both function fire one after another?? or how can i write both
logic in one function?
No comments:
Post a Comment