【发布时间】:2012-11-04 12:20:30
【问题描述】:
我正在使用带有 WordPress 主题的灯箱。它在 lightbox.js 文件中定义了一些图像路径。例如
this.fileLoadingImage = '/images/lb-loading.gif';
因此,如果我将上述路径更改为以下路径以从主题目录中获取图像:
this.fileLoadingImage = 'wp-content/themes/mytheme/images/lb-loading.gif';
它只适用于主页。但它不适用于其他页面。上述路径在其他页面上无效。那么如何动态获取图像目录的完整路径呢?
【问题讨论】:
标签: javascript wordpress lightbox