jquery cookbook example.

jquery cookbook example.

Hi,
I study jquery using jquery cookbook by o'reilly. I tried to use this example in book:


alert('Page contains ' + jQuery(document.getElementsByTagName('a')).length + ' <a> Elements, And has a '
+ jQuery(document.body).attr('bgcolor') + ' background');

but jQuery(document.body).attr('bgcolor') returns allways undefined. Can somebody explain to me why? thanks.