var opts = $.extend({}, $.ias.defaults, options);
function get_scroll_treshold(pure)
{
el = $(opts.container).find(opts.item).last();
if (el.size() == 0) return 0;
treshold = el.offset().top + el.height();
if (!pure)
treshold += opts.tresholdMargin;
return treshold;
}
你好,这是上面的代码片段^。我遇到的问题是它抛出这个错误:
TypeError: $(opts.container).find(opts.item).last is not a function
我使用https://github.com/webcreate/infinite-ajax-scroll这个插件。我浏览了github页面上列出的问题,似乎没有提到我遇到的问题。 有什么意见建议吗?
是否jQuery的工作,其他地方在网页上?你是否在使用任何可能会改变'$'对象值的插件? – nbrooks 2012-08-10 05:48:04
没有价值没有改变。是的jQuery的作品在页面周围工作 – cppit 2012-08-10 05:53:24
我没有看到'EL'被初始化;像'var el'什么的! – Vishal 2012-08-10 06:14:16