Below you’ll see two element IDs in the combined “onClick” event. Regardless of which button is clicked, I need both buttons to run the “indexInit” function. But I also need each button to set a variable. These variables are different for each button. Is there a way to use an if statement, the condition for which is defined by the element ID?
$w("#index024,#index025").onClick(event => {
// if statment here!
indexInit();
})
I know how to write if statements. I just don’t know how to check the ID. I appreciate any help or ideas. Figuring this out will save me a ton of code.
Thank you so much.