Hi !
2005/11/9, Adam Groves <adam.groves@gmail.com>:> I'm probably being a bit of a div here but how do I add css class
attributes
> to a link_to_remote?
> I've got:
>
> <%= link_to_remote("Add an address",
> :url => {:action => 'new_address', :project =>
@project},
> :update =>'partner_div',
> :loading => "Element.show('loader')",
> :complete => " Element.hide('loader')")
> %>
>
> I've tried sticking in :class => 'myclass' everywhere but to
no avail. Where
> should I place it?
You have to add another Hash, like this:
<%= link_to_remote("Add an address",
{:url => {:action => ...}, :update => 'partner_div'},
{:class => 'myclass', :id => 'test', :title =>
'some title'}) %>
That's what the html_options parameter is on
http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html#M000426
Hope that helps !
François
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails