I am writing some jQuery code that involves jumping from several functions. In one function, an 'if'-statement is used to select where the code will go next. The condition for the if statement is the value of a variable that was passed from the previous function. So, to clarify, a function passes a variable to another function, which then goes to another function which is chosen based on the function it originated from.
Here is my code in JSFiddle: http://jsfiddle.net/VFVk7/
As you can see, when you click on any of the buttons, it goes to all of the optional functions from the If-statement, not just one. Does anyone know why this is happening? Thanks very much!