I need to show/hide menu only using amp-animation. I created two different amp-animations showMenu
and hideMenu
. My first attempt was to do something like that
<div on="tap:AMP.setState({ menu: { open: !menu.open }}),menu.open ? hideMenu : showMenu">
Which didn't work because apparently you cannot put conditional logic on top level but can inside setState
function. Is there anything I can do?