Odd Show/Hide issue upon page load

Very new to Webflow but really enjoying it - I’m an Adobe Muse convert but am decent in code (not a master by any imagination).

I’m having an issues with the Show/Hide function. I created a local site search bar that is visible when you click a magnifying glass button and becomes non-visible on second click. This works when on the page you are working on is previewed but when you navigate to another page with the search bar (I made it into a symbol - btw) the search bar shows up automatically even though the initial state is set to non-visible.

The animation is set with 2 click action based on a trigger but when each page loads it brings the search bar into view immediately and the trigger button does not work to remove it - now here is the odd part: If I click the nav button for the same page again, the page reloads, the search bar disappears, and all works normally … any thoughts?

Thanks so much in advance!

Stay Epicurious!

Preview Read-Only Link

1 Like

Hello @epicurious_fox

Not sure what us causing the problem, but can you try using class targeting for the search bar. You are using the search bar for different pages and using class targeting is a very good way of reusing interactions.

Screen record > https://www.useloom.com/share/bf0bcac91844411a8f93fedaf82157bc

Piter :webflow_heart:

1 Like

Thanks for the response, sir.

I did try the class selection that you described but what is happening is when you are in preview mode and you use the navigation buttons to go to different pages, the search bar appears on load (which it should not do) - when you load the page a second time by clicking the button again, it works the way it is supposed to on the second click of the nav button … maybe that helps better explain the oddity of it? Could possibly be a bug in the preview mode even?

Still looking for a solution though …

1 Like

Maybe this is normal for preview mode, but I’m not sure. What about the published link? Still the same problem?

One thing you can do is using display none for the search bar.See here > https://www.useloom.com/share/3117fe1ae16c4c2c91e2a156747d9e78

But if you want to make edits you will need to display back to block.

VEEEERY interesting - it does NOT do this in the published site . . . I think we have just found a bug in the previewer, my friend.

Stay Epicurious!


Not sure if this is a bug :smiley: Have fun! :webflow_heart:

Hi Piter if not bug then what is? I have a similar issue with show/hide interaction. There are numerous threads with similar issues with no solution.