Skip to content

Commit e3b6d7a

Browse files
committed
Update layer.ext.js
上面已经写了 img = parent.find(options.img||'img') 下面这段明显是写错了(options.img写成了photos.img), 而且没必要再查找一遍子元素 parent.find(photos.img||'img')
1 parent c534fc8 commit e3b6d7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extend/layer.ext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ layer.photos = function(options, loop, key){
9696
if(!type){ //页面直接获取
9797
var parent = $(options.photos), img = parent.find(options.img||'img');
9898
if (img.length === 0) return;
99-
loop || parent.find(photos.img||'img').each(function(index){
99+
loop || img.each(function(index){
100100
var othis = $(this);
101101
data.push({
102102
alt: othis.attr('alt'),

0 commit comments

Comments
 (0)