Hello,
I have a function like this:
I want it to look like this:Code:video.addEventListener("play", function(event) {
// show image A
});
How would I achieve this?Code:if (play) {
show image A
} else {
show image B
}
Thanks
Printable View
Hello,
I have a function like this:
I want it to look like this:Code:video.addEventListener("play", function(event) {
// show image A
});
How would I achieve this?Code:if (play) {
show image A
} else {
show image B
}
Thanks
It's just an example. I want to make an else statement to a function like this one and see if it possible. There should be other ways around but I has yet to discover it.
Sorry, I'm confused at the moment, will ask again later after doing some experiments.
Is there some reason why simply wrapping the if/else inside the function wouldn't work?