Animate an element using code

I’m trying to animate an element on my header using a code. So i followed the tutorials on YT and forums, but it hasn’t worked out for me. I’m trying to animate #box5 which is a container box, do i miss something?

let fadeOptions = {
    "duration":   1000,
  "delay":      0
}

import wixWindow from 'wix-window';
export function button11_click(event) {
 if ($w("#box5").hidden) {
 $w("#box5").show('fade', fadeOptions);
 $w("#mobileImage1").show();
 $w("#mobileImage2").hide();
 $w("#button20").show();
 $w("#button14").show();
 $w("#button12").show();
    }
 else {
 $w("#box5").hide('fade', fadeOptions);
  $w("#mobileImage1").hide();
 $w("#mobileImage2").show();
 $w("#button20").hide();
 $w("#button14").hide();
 $w("#button12").hide();
    }
}