Streaming live at 10am (PST)

Odd Show/Hide issue upon page load


#1

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
https://preview.webflow.com/preview/strickler-2019?utm_source=strickler-2019&preview=507c483d2ca2033787673d4d68a5bd25


#2

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:


#3

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 …


#4

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.


#5

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!


#6

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