Default event handler question

Hello All.

I’d like to ask how it is possible to invoke a default event handler from my own code. For example, I need to hide element on a mouse click on button and then go to linked page. I need to have my own onClick event handler which will hide the element and then call the default Wix function which handles the link clicks. How can I do it?

Thanks in advance!
Yury

Hi Yury,

Mixing handlers is basically bad practice (and very rarely needed)… try keeping everything that happens for an event at the same place.
So, in the described use case, you can simply use ’ wixLocation.to() ’ at the end of your onClick handler.

Liran.

Thanks Liran!