[jQuery] href attribute discrepancies: is this a bug?
Hi, all!
i noticed the following today (jQ v1.1.3.1):
var lbl = jQuery("<a href='#foo'/>");
alert( lbl.attr('href') ); // == "#foo"
alert( lbl[0].href ); // == "http://my.site/path/#foo"
My questions are:
a) What is the reason (if any) for this discrepancy?
b) Is this a jQ bug?
i would expect .attr('href') to return the same thing as elem.href.
???