jQuery Colorbox 随机无法对图像进行分组
jQuery Colorbox randomly fails to group images
我在我的应用程序中使用 jQuery Colorbox
,像这样:
<ul>
<li>
<a href='images.html?cn=000001' >[000001] </a> -
<a href='/folder/1/Appreciation.jpeg' class="imagelnk">Appreciation.jpeg</a>
</li>
<li>
<a href='images.html?cn=000001' >[000001] </a> -
<a href='/folder/1/cheque.jpg' class="imagelnk">cheque.jpg</a>
</li>
</ul>
在 javascript 里面,在 .ready()
里面,我有这个:
$('a.imagelnk').colorbox({
rel: 'imagelnk',
current: '<i class="blue smaller">Document {current} of {total}</i>',
width: '1200px'
});
一切正常,除了最近,我注意到灯箱每次都无法分组。因此,只有第一个被点击的 a
被加载,上面的 current
参数完全丢失。
这种行为出现完全随机,但经常发生。控制台中没有错误消息。
我的Colorbox版本是1.6.1,jQuery版本是jquery-2.1.3.
请大家帮忙!
编辑
Opera 中出现错误。我刚刚发现在 Chrome 中我不会产生这个错误。出于某种原因,我现在必须为 Opera 12.17(webkit 之前的最新 "old" Opera)开发。
这个有用吗?
$('a.imagelnk').colorbox({
rel: 'imagelnk',
current: '<i class="blue smaller">Document {current} of {total}</i>',
width: '1200px'
}).attr('rel', 'imagelnk');
我在我的应用程序中使用 jQuery Colorbox
,像这样:
<ul>
<li>
<a href='images.html?cn=000001' >[000001] </a> -
<a href='/folder/1/Appreciation.jpeg' class="imagelnk">Appreciation.jpeg</a>
</li>
<li>
<a href='images.html?cn=000001' >[000001] </a> -
<a href='/folder/1/cheque.jpg' class="imagelnk">cheque.jpg</a>
</li>
</ul>
在 javascript 里面,在 .ready()
里面,我有这个:
$('a.imagelnk').colorbox({
rel: 'imagelnk',
current: '<i class="blue smaller">Document {current} of {total}</i>',
width: '1200px'
});
一切正常,除了最近,我注意到灯箱每次都无法分组。因此,只有第一个被点击的 a
被加载,上面的 current
参数完全丢失。
这种行为出现完全随机,但经常发生。控制台中没有错误消息。
我的Colorbox版本是1.6.1,jQuery版本是jquery-2.1.3.
请大家帮忙!
编辑
Opera 中出现错误。我刚刚发现在 Chrome 中我不会产生这个错误。出于某种原因,我现在必须为 Opera 12.17(webkit 之前的最新 "old" Opera)开发。
这个有用吗?
$('a.imagelnk').colorbox({
rel: 'imagelnk',
current: '<i class="blue smaller">Document {current} of {total}</i>',
width: '1200px'
}).attr('rel', 'imagelnk');