我在我的 Rails 3.1 应用程序中使用 jQuery Lightbox。我正在使用资产管道,我想知道处理这些对 .js 文件中图像的引用的最佳方法是什么:
// jQuery Lightbox Init / settings
// Visit http://leandrovieira.com/projects/jquery/lightbox/ for more options and updates
jQuery("a[href$=.jpg],a[href$=.png],a[href$=.gif]").lightBox({
imageLoading: '/images/jquery-lightbox/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
imageBtnPrev: '/images/jquery-lightbox/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
imageBtnNext: '/images/jquery-lightbox/lightbox-btn-next.gif', // (string) Path and the name of the next button image
imageBtnClose: '/images/jquery-lightbox/lightbox-btn-close.gif', // (string) Path and the name of the close btn
imageBlank: '/images/jquery-lightbox/lightbox-blank.gif' // (string) Path and the name of a blank image (one pixel)
});