A click is an EVENT, it either happened or it didn't. If it didn't happen, then the "else" code that you're talking about would be running constantly and repeatedly.

I'm not sure if what you asked for is what you meant, because "if a button isn't clicked" describes every other moment or event from when the page loads.

Can you explain what you want to do ?


Sanam 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?
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.387 / Virus Database: 270.13.16/2241 - Release Date: 07/16/09 05:58:00


Reply via email to