Skip to content

Commit bf76feb

Browse files
committed
$.contains is included into DOMtastic since 0.7.3
1 parent bef9784 commit bf76feb

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/jquery.lazyloadxt.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,6 @@
4646
$data = $.data || function (el, name) {
4747
return $(el).data(name);
4848
},
49-
// $.contains is not included into DOMtastic, so implement it there
50-
$contains = $.contains || function (parent, el) {
51-
while (el = el.parentNode) {
52-
if (el === parent) {
53-
return true;
54-
}
55-
}
56-
return false;
57-
},
5849
elements = [],
5950
topLazy = 0,
6051
/*
@@ -197,7 +188,7 @@
197188
topEdge;
198189

199190
// remove items that are not in DOM
200-
if (!$contains(docElement, el)) {
191+
if (!$.contains(docElement, el)) {
201192
removeNode = true;
202193
} else if (force || !objData.visibleOnly || el.offsetWidth || el.offsetHeight) {
203194

0 commit comments

Comments
 (0)