Here’s what I would like to do in pseudocode form.
Bind Two Functions to Click Event
On 1st/Odd Clicks Do FunctionA()
On 2nd/Even Clicks Do FunctionB()
The .toggle() function seems to not be designed for this.
I’m sure this exists in jQuery but my googling hasn’t resulted in anything. 🙂
I don’t see how this isn’t exactly what
toggleis designed for…You may be confused by the other
togglefunction that exists in jQuery, which won’t be called if you pass functions as the arguments.