Forum: Ruby on Rails jQuery simpleZoom Plugin

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.
thanks.
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" %>
or
<%=image_tag product.image , class: "zoom" %>

these are certain plugins you can use for zoom:
http://www.elevateweb.co.uk/image-zoom/examples
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" %>
</a>
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'
data-zoom-image="images/large/image1.jpg"/>
when i use data-zoom-image i got error, how should i do?
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.