Change $.dom.contains, fix $.dom.hasAttr.