How to show the bigger image after clicking on thumnail?

How to enlarge a thumnail ,when somebody click on it in ruby on rails ??
is there any gem for it?

please help .


Thanks

Regards

Amrit Pal

amritpalpathak.blogspot.com

On Sun, Feb 12, 2012 at 9:04 AM, Amrit Pal P.
<[email protected]

wrote:

How to enlarge a thumnail ,when somebody click on it in ruby on rails ??
is there any gem for it?

please help .

If I’m not wrong… this may help

http://fancybox.net/

or maybe I missunderstood your question

Javier Q.

I think you can call a link_to method to point to this image in a large
size! If you are using paperclip you can call link_to image_foo,
path_to_original_size .

Thanks
Em 12/02/2012 13:06, “Amrit Pal P.” [email protected]
escreveu:

On Sun, Feb 12, 2012 at 7:48 PM, Javier Q. [email protected]
wrote:

If I’m not wrong… this may help

http://fancybox.net/

or maybe I missunderstood your question

Perhaps.
Actually i have number of thumnails on a page and i want when someone
click on any thumnail it should show its bigger image without
effecting the other thumnails and vice versa.
In a simple html file ,its easy to do but in ruby on rails i don’t
know how to perform it.


Thanks

Regards

Amrit Pal

amritpalpathak.blogspot.com

Your question is not rails related since that is done via javascript.
Here
are some libs for jquery:

http://jacklmoore.com/colorbox/

On Sun, Feb 12, 2012 at 8:48 PM, radhames brito [email protected]
wrote:

Your question is not rails related since that is done via javascript. Here
are some libs for jquery:
But i want to do it in rails.
Colorbox - a jQuery lightbox

Lightbox2
jquery will work in rails’s environment?

Thanks

Regards

Amrit Pal

amritpalpathak.blogspot.com

On Sun, Feb 12, 2012 at 8:40 PM, thiagocifani [email protected]
wrote:

I think you can call a link_to method to point to this image in a large
size! If you are using paperclip you can call link_to image_foo,
path_to_original_size .
thanks for the reply.i hope it will help but i am not a rails expert
so don’t know how to implement it
please can you provide a example or link for that?
I will be grateful to you.


Thanks

Regards

Amrit Pal

amritpalpathak.blogspot.com

On Sun, Feb 12, 2012 at 10:24 AM, Amrit Pal P. <
[email protected]> wrote:

On Sun, Feb 12, 2012 at 8:48 PM, radhames brito [email protected] wrote:

Your question is not rails related since that is done via javascript.
Here
are some libs for jquery:
But i want to do it in rails.
Colorbox - a jQuery lightbox

Lightbox2
jquery will work in rails’s environment?

YES! :smiley:

That’s why I mentioned fancybox… it’s a javascript way to enlarge
images

Javier Q

On Sun, Feb 12, 2012 at 11:24 AM, Amrit Pal P. <
[email protected]> wrote:

watch this

I think you are a bit confused.

Then try to make the right question and i’ll try to help

jquery will work in rails’s environment?

I bit of explanation. Rails handle the server side code, javascript is
run
on the client side. If you want content in your html to change like a
resizing of an imagem the best way to do it is via manipulating it via
javascript, rails can be paired with any javascript library.

On 12 February 2012 15:05, Amrit Pal P. [email protected]
wrote:

effecting the other thumnails and vice versa.
In a simple html file ,its easy to do but in ruby on rails i don’t
know how to perform it.

In addition to the input from others I just wanted to point out that
Rails just generates html and javascript to put on the page. If you
know how to do it in html and you are not sure how to do it the Rails
way, then just code the view to generate that html. Remember that you
can always use View > Page Source (or something similar) in the
browser to look at the html that your view file is generating.

Colin

On Sun, Feb 12, 2012 at 8:57 PM, Javier Q. [email protected]
wrote:

Colorbox - a jQuery lightbox

Lightbox2
jquery will work in rails’s environment?

YES! :smiley:

That’s why I mentioned fancybox… it’s a javascript way to enlarge images
ok .thank you
i will try it.


Thanks

Regards

Amrit Pal

amritpalpathak.blogspot.com