Ruby on Rails Tuesday, July 22, 2014

thanks for help.
it work for static image, but when select image from db it not work,

it need two image when select 1 is small size and 2 is big size image.
in my code:
<a href="" class="smoot_zoom">
<%=  image_tag product.image, class:"smoot_zoom" %>
</a>
On Friday, July 18, 2014 7:34:22 PM UTC+7, Ruby-Forum.com User wrote:
Assuming you are applying jquery on selector class for image , if you
can apply of static image, similarly you can apply on image from db.


<%= image_tag "add_zoom.jpeg" , class: "zoom" %>
or
<%=image_tag product.image , class: "zoom" %>

these are certain plugins you can use for zoom:
http://www.elevateweb.co.uk/image-zoom/examples

--
Posted via http://www.ruby-forum.com/.

--
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-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d7f0e2be-d54d-4f10-afb9-b2e023c2fb07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment