Forum: Ruby on Rails jQuery simpleZoom Plugin

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
988cf585499cfbd221e6fd3f877ac507?d=identicon&s=25 kh hacker (Guest)
on 2014-07-16 11:07
(Received via mailing list)
Dear all RoR developers,
i have a problem when i try to use jQuery simpleZoom Plugin in rails.
i want to use it when select image from database, so how could i do?

any one could help me.
379bab738b06250a3a804744710de870?d=identicon&s=25 Pardeep Dhingra (pardeepdhingra)
on 2014-07-18 14:33
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" %>
<%=image_tag product.image , class: "zoom" %>

these are certain plugins you can use for zoom:
988cf585499cfbd221e6fd3f877ac507?d=identicon&s=25 kh hacker (Guest)
on 2014-07-22 10:07
(Received via mailing list)
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" %>
988cf585499cfbd221e6fd3f877ac507?d=identicon&s=25 kh hacker (Guest)
on 2014-07-22 10:29
(Received via mailing list)
i have try it but i got error when i place this code with rails
<img id="zoom_01" src='images/small/image1.png'
when i use data-zoom-image i got error, how should i do?
This topic is locked and can not be replied to.