[jQuery] Getting the text of an element: IE6 vs. FF3

[jQuery] Getting the text of an element: IE6 vs. FF3


I have some HTML:
<a href="#" class="links">Link One</a><br />
<a href="#" class="links">Link Two</a><br />
<a href="#" class="links">Link Three</a><br />
And the following JQuery JS to test the "onclick" handler
$(".links").click(function(){
alert(
"this.text -> " + this.text + "\n" +
//above returns "undefined" in IE 6
"this.childNodes[0].data -> " + this.childNodes
[0].data + "\n"
//returns expected text in FF and IE 6
);
Why does
this.text
work fine with FF but I need something more convoluted like
this.childNodes[0].data
to get it to work in IE6? I thought that JQuery shielded me from
these wacky cross-browser issues