How can I alternate a call to two functions when pressed? For example, here is a button
<div id="fooButton" />
and here is javascript
function fooOne() {
alert('foo One called');
}
function fooTwo() {
alert('foo Two called');
}
How do I call fooOne () and fooTwo () on alternative button presses?
source
share