Expand/Collapse not working on published site

My preview -


In the photo, the #phoneheading element is collapsed by default and is set to show on all pages.

The code -

import wixWindow from 'wix-window';

$w.onReady(function () {
 if (wixWindow.formFactor === "Mobile"){
        $w("#quickActionBar1").collapse();
 }else{
        $w("#phoneHeading").expand();
 }
});

You can check the live site at lkhonda.com, where the code is not working, till yesterday it was working fine. The issue has shifted all my elements over each other.

This is not only one place where it is not working, there are many places.
@Marlowe (Wix)
@Yisrael (Wix)

Hi Lakshay,

What element is
$w ( “#quickActionBar1” ). collapse ();
It gives a fault.
it could be that the code isn’t running since this code isn’t right.

Kind regards,
Kristof

That is an element on mobile provided by Wix. That is not making any fault to code.


Thanks for the help!!

You do not have that element on your site. As you can see from the Mobile view in the Editor:

You will first need to add this element to the site, and you can then access from code.

Since I have collapsed it for all pages as well as mobile. (observe the code and settings carefully).
The problem is for desktop site.

No need for further investigation for now, automatically the problem is resolved just a minute ago.

Thanks for the help!!

Not sure what the problem was, but glad it got worked out.

BTW - I even see on my screen shot that I posted that you indeed have the QuickActionBar. I missed it.:face_with_hand_over_mouth: