When the user clicks on an image, I want the onClicks on all other images to be disabled until my function has finished.
I currently have this code that disables the
Basically you're setting the elements' onclick to false and true.
it's the equivalent of doing something like
then
What you should do is maintaining some variable that you check against to see if you can start the function or not.
locked = false;
function yourFunction() {
if (locked) {
locked = true;
//... Do what you have to do here
locked = false;
};
}