jquery bind click event
Posted
by Adem
on Stack Overflow
See other posts from Stack Overflow
or by Adem
Published on 2010-06-07T09:47:32Z
Indexed on
2010/06/07
9:52 UTC
Read the original article
Hit count: 319
I am having a problem with my code
if (text.length < 1)
{ args.IsValid = false; $('#<% = cmdSaveRequest.ClientID()> %>').removeAttr('click'()); } else { $('#<% = cmdSaveRequest.ClientID()> %>').click(savingData()); args.IsValid = true; }
when I assign click event like
$('#<% = cmdSaveRequest.ClientID() %>').click(savingData());
it executes the saving data function Is there any way to bind the click event to button but whiteout executing the function just bind it and after user clicks the button then the function executes?
© Stack Overflow or respective owner