开发者

Preloading images with Paperclip (in Rails)

I'm not sure how to access the src of a Paperclip img. What am I doing wrong?

preloadImg = new Image;
preloadImg = <%= @other_images[4].im开发者_如何学编程age.url[:display] %>;


You need to set preloadImg.src (and maybe wrap some quotes around the string, I don't know how Ruby handles this).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜