X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fselector.js;h=5425d94821db4d0c2b4adf53018aa4f4e0b36469;hb=d1a34f79081dfcfcfe851412dafd172428a6d92a;hp=cf4ff9dc4306270bd89706cf05477701097fcf80;hpb=2ff3e49279744ecd099693fa5b7faeb14ca301d8;p=jquery.git diff --git a/src/selector.js b/src/selector.js index cf4ff9d..5425d94 100644 --- a/src/selector.js +++ b/src/selector.js @@ -703,7 +703,8 @@ try { // Check to see if an attribute returns normalized href attributes div.innerHTML = ""; - if ( div.firstChild && div.firstChild.getAttribute("href") !== "#" ) { + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { Expr.attrHandle.href = function(elem){ return elem.getAttribute("href", 2); };