Link_to image_tag popup

38 views
Skip to first unread message

Avi

unread,
Jun 5, 2013, 10:39:26 AM6/5/13
to rubyonra...@googlegroups.com
Hello All,

How can I add a popup in link_to image_tag?

I am trying as :-
<%= link_to image_tag(@user.avatar.url(:small)), '/users/edit', :popup=>['original_image', 'height=700,width=900'] %>

It goes to the edit page. But it doesn't opens popup.
Is this the correct way to call a popup?
How can I achieve this?


Thanks,
Avinash

buyzlots

unread,
Jun 5, 2013, 10:43:17 AM6/5/13
to rubyonra...@googlegroups.com
Are you looking to open that link in a new tab? if so us :target => "_blank"… or are you looking for a lightbox style thing?  If so checkout http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/ its very easy to use. 

Matt

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/072470f7-d646-415e-900d-b58568c37311%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages