Forum: Ruby on Rails Using a DIV or SPAN for a content_tag (link_to_remote)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ken C. (Guest)
on 2006-05-03 21:10
(Received via mailing list)
I was wondering if there was an easy way to over ride the <a> tag
that is used as the content_tag() value when using link_to_remote(),
perhaps using a SPAN or DIV. I see follow the chain in the source
code and I guess I could write my own helper, but I was wondering if
there was a way to do this already?

I know already that SPAN's and DIV's are not supported onclick
containers in IE 6, but it's habbit for me to use them. Currently I
have done something like this which puts an a tag around my SPAN.

<%= link_to_remote( content_tag("span", "", :class => "cssrulz"),
                         { :url => { :controller => "bla", :action =>
"destroy", :id => },
                           :success => "new Effect.Fade('bla_#
{}')" } ) %>
This topic is locked and can not be replied to.