【发布时间】:2011-01-26 21:38:18
【问题描述】:
我正在使用 Galleria 进行幻灯片放映。我想在stage 旁边放置一个小的“更大”链接。
我有这个“更大”按钮的代码:
this.fullres = this.create('div', 'fullres');
this.get('fullres').innerHTML = '<a href="#">Larger</a>';
this.appendChild('fullres', this.fullres);
我有这段代码将每个<img> 的rel= 标记分配给页面自定义字段中的全尺寸图像URL:
<img ... rel="<?=$attachments[$i]['fullres']?>" />
使用 JQuery,我希望提取 active 图像的 rel= 标记值并附加 .fullres href 标记。这是我到目前为止的代码,但它不起作用:
var title = $(.images).attr('rel'); // pulls the fullres url from the rel tag
$('.galleria-fullres').attr('href', ); //append the galleria fullres href with the rel info
【问题讨论】:
-
您如何获得对活动图像的引用?它有课吗?
标签: javascript jquery wordpress galleria