jQuery simpleZoom Plugin

24 views
Skip to first unread message

kh hacker

unread,
Jul 16, 2014, 4:39:46 AM7/16/14
to rubyonra...@googlegroups.com
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.

Pardeep Dhingra

unread,
Jul 18, 2014, 8:34:22 AM7/18/14
to rubyonra...@googlegroups.com
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/.

kh hacker

unread,
Jul 22, 2014, 4:06:34 AM7/22/14
to rubyonra...@googlegroups.com
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>

kh hacker

unread,
Jul 22, 2014, 4:28:02 AM7/22/14
to rubyonra...@googlegroups.com
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:
Reply all
Reply to author
Forward
0 new messages