Kfir Lavi wrote:> But what I want is a bit odd. I want that it will not do again
> link_to_remote but toggle.
Instead of link_to_remote you could use remote_function
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000420
then put a condition around that:
<a href="#" onclick="if
($(''thing'').style.display == ''none'') {
<%= remote_function(:update => "thing",
:url => { :action => :update_options },
:complete => "new
Effect.BlindDown(''thing'');") %>
}
else { new Effect.BlindUp(''thing''); }
return
false;">weeee</a>
<div id="thing" style="display:none;"></div>
Haven''t tested that though, but should work-ish.
--
Posted via http://www.ruby-forum.com/.