you mean you have 2 buttons, both with a click event bound to them via the .saveButton class assignment and you want to know which one you clicked?
maybe give them ids and test this.attr("id") ? On Jul 16, 7:46 am, Sanam <kcssm2...@gmail.com> wrote: > Hello, > I am trying to do something like this. > > if a button is clicked call one function > > $('.saveButton').click(function(){ > ////call one function > }); > > else call another function. > > But I don't have any idea how to implement if else in a clicked event. > Can any one help me?