Unable to show container after hiding it.

I am unable to show a container after collapsing it. Although it’s not visible on the screen, it’s logging as visible and not hidden.

    $w("#footer").expand();
    $w("#footer").show();

    console.log(`>>>>>>>>>>>>>>>${ $w("#footer").isVisible }`) // true
    console.log(`>>>>>>>>>>>>>>>${ $w("#footer").hidden }`) // false

Hi Michael.
Can you give us a bit more of the code you have on your page?
Did u hide it using code or in the editor itself.

The .expand() is if you collapse an element.
Collapsing will move element below the collapsed element upwards if they are in a range of 70 pixels if i’m correct if they are farther down they won’t go up.

Hiding will just hide the element but still take the place.

To hide/show somthing use
.hide()
.show()
To check if its hidden /visible use :
.isVisible //true / false
.hidden //true / false

To collapse/expand an element use:
.collapse()
.expand()

to check if an item is collapsed use
.collapsed //true / false

Kind regards,
Kristof.

I have the tic the collapsed box on start.

The exact flow that I am using. It hides and shows until the second round.

function showView1() {
  $w("#view1").show();
  $w("#view2").hide();
  $w("#view3").hide();

  $w("#footer").hide();
  $w("#footer").collapse();
}

function showView2() {
  $w("#view1").hide();
  $w("#view2").show();
  $w("#view3").hide();

  $w("#footer").show();
  $w("#footer").expand();
}

function showView3() {
  $w("#view1").hide();
  $w("#view2").hide();
  $w("#view3").show();

  $w("#footer").hide();
  $w("#footer").collapse();
}

function restart() {
   showView1();
}

// Steps: 
// 1.  This works
showView1();

// 2.  This works
showView2();

// 3. This works
showView3();

// 4. This works
restart();

// 5. This works
showView1();

// 6. >>>>>> This is where it fails
showView2();

So the footer does not show anymore when going to showView2?

@volkaertskristof The footer shows on the initial round in view2, but does not show on the second round. But, the code says it is visible, but it is not visible on the screen.

Is there a way to reload the whole page after clicking restart()? I have tried wixLocation . to ( wixLocation.url ); and it doesn’t work.

I never really found a way to refresh.
What i do to refresh is:
make an empty page(reloadpage).
onReady use the [wixLocation.to("y](wixLocation.to("your) our page ")

on your page add wixLocation.to(“reloadpage”)

this way when you go to the reloadpage you go straight back to the page you added there.
You can also use wixSessions to store the URL where you came from.
and instead of using [wixLocation.to("your](wixLocation.to(“your) page”)
you can use something like:
wixLocation.to(“wixSession.url”)

Kind regards,
Kristof

i don’t see anything wrong here.
Is this all the code you have on your page?

@volkaertskristof Thanks I will try using an empty page.

I also tried it myself and it seems to be working without any problem.

@volkaertskristof I have a lot of code on the page, but they are the main views.

@michaelzaladonis
Sometimes the problem lies somewhere else then where you think.
maybe post some more code.

@volkaertskristof Thank you for your help. The problem was where you suspected, somewhere else.