I am looking for a way to have two separate operations / functions / \"blocks of code\" run when something is clicked and then a totally different block when the same thing
I used this to create a toggle effect between two functions.
var x = false; $(element).on('click', function(){ if (!x){ //function x = true; } else { //function x = false; } });