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.
on 2014-07-16 11:07
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
on 2014-07-22 10:07
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 2014-07-22 10:29
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?