Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 521 Bytes

2015-12-25-how-to-check-dom-wrapped-by-jquery.md

File metadata and controls

22 lines (19 loc) · 521 Bytes
id title date author layout guid permalink categories
35
How to check DOM wrapped by jQuery?
2015-12-25 11:01:07 +0000
liu1084
post
/?p=35
linux
if ($(l)[0] === $(line)[0]){
    return; //do not check myself,continue
}

//or

if ($(l).get(0) === $(line).get(0)){
    return; //do not check myself,continue
}

Because jQuery wrapped DOM object is in an array, so get it by .get(index) or using index number.