Ax Plains wrote:
Hi everyone, hi have a similar problem in a view:
I would like the page to “remember” that the div has been hidden after a
(The div comes up always visible even if it was set to hidden before).
Any simple way to do this?
Thanks a lot in advance
If you are reloading the page in the controller, then you can use an
instance variable in the controller to decide whether the div should be
hidden or not.Like,
In controller :
@show_div_tag = true
In view :
<% default_style = @show_div_tag ? “” : “display:none” %>
You can also optimize this code.
In case if you are manually reloading the browser, the above is