Re: Newbie - Rails 3 lightbox?

Walter Lee Davis
Fri, 15 Oct 2010 15:29:30 -0000

I think Lightbox2 uses the classname rather than the rel for the
initial hook. Rel is used for a lot of other stuff like geometry and
format, but classname does the initial hookup.

Walter

On Oct 15, 2010, at 11:24 AM, Anders_P wrote:

> Hello!
>
> I''m trying to create a simple image "popup" effect using
Lightbox2,
> http://www.huddletogether.com/projects/lightbox2/. But I don''t get
it
> to work. My code looks lite this:
>
>
>  <a href="<%= ad.image.url(:thumb) %>"
rel="lightbox"><img src="<%> ad.image.url(:thumb)
%>" />
>
>
> This generates:
>
>
>  <a
href="/system/images/301/thumb/tufftroja_19225958.jpg?1287075644"
> rel="lightbox"><img src="/system/images/301/thumb/
> tufftroja_19225958.jpg?
> 1287075644" />
>
>
> And in my application.html.erb
>
> <%= render ''layouts/stylesheets'' %>
> <%= stylesheet_link_tag ''lightbox'' %>
> <%= javascript_include_tag :defaults, ''lightbox'' %>
>
> The image shows up, but nothing happens when I click on it.
>
> Any suggestions on what I''m doing wrong would be appreciated!
>
> Thanks!
> // Anders
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-
> talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> .
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
> .