How about:
<div id="browser_bar">
</div>
<%= link_to( "Show/Hide" , ...... ,
:onclick => "Effect.toggle(''browser_bar'',
''blind'')
%>
Hope that helps,
Pradeep
BB wrote:> I''m trying to implement a show/hide details function.
>
> I have the show part done, but I''m not sure how to get it to hide.
>
> My app looks like this so far:
>
> View:
>
> <%= link_to_remote "Show/Hide", :update =>
"details", :url => { :action
> => "show", :id => leif } %>
> <p id="details"></p>
>
> Action:
>
> def show
> @leif = Leif.find(params[:id])
> render_partial ''show''
> end
>
> _show.rhtml:
>
> <% for column in Leif.content_columns %>
> <p>
> <b><%= column.human_name %>:</b> <%=h
@leif.send(column.name) %>
> </p>
> <% end %>
>
> Any tips or ideas would be appreciated
--
Posted via http://www.ruby-forum.com/.