event on hide element

Hello. How i can attach event when i try $$(id).hide() && $$(id).show()?
This events i find only for window, but what about another elements?

you can catch view showing using onViewShow event

thx, but what about view hiding?

There is no function for the hide view.
One solution is to watch if the view is not visible.

on: {
onViewShow(){
//interval check if view is not visible
const $this = this;
const close_id = setInterval(() => {
if (!$this.isVisible()) {
alert(123);
// required
clearInterval(close_id);
}
}, 100);
}
}