Ruby on Rails Tuesday, July 22, 2014

i have try it but i got error when i place this code with rails
<img id="zoom_01" src='images/small/image1.png' data-zoom-image="images/large/image1.jpg"/>
when i use data-zoom-image i got error, how should i do?



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/ad0d45ff-42c3-470f-be4a-77601b2a2d29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment