Html options in link_to_remote

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?
Thanks in advance
Adam

Hi !

2005/11/9, Adam G. [email protected]:

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