Update layer.ext.js

上面已经写了
img = parent.find(options.img||'img')
下面这段明显是写错了(options.img写成了photos.img),
而且没必要再查找一遍子元素
parent.find(photos.img||'img')
pull/19/head
xuebing 2015-12-29 17:43:06 +08:00
parent c534fc8c3e
commit e3b6d7af4b
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ layer.photos = function(options, loop, key){
if(!type){ //页面直接获取
var parent = $(options.photos), img = parent.find(options.img||'img');
if (img.length === 0) return;
loop || parent.find(photos.img||'img').each(function(index){
loop || img.each(function(index){
var othis = $(this);
data.push({
alt: othis.attr('alt'),