@julian said: I imagine if href is missing, this.href would be undefined, no? smile No. I was surprised that it's been an empty string that got checked instead of undefined too, but it seems I'm to adapted to jQuery ^^ This is because you use the DOM-element rather than jQuery to get the href: document.createElement('a').href === '' $('<a></a>').attr('href') === undefined