[jQuery] how to get innerHTML from an external bind()?

[jQuery] how to get innerHTML from an external bind()?


i need to bind a click function to several thousand table cells. would making
an external function be better than specifying an anonymous one
inline?...i'm afraid that with the inline version it would make as many
function instances as there are table cells...correct me if i'm wrong.
either way i need to get the innerHTML of each cell on click, and it doesnt
seem to do it properly using jQuery object:
$("td").bind("click", test);
function test(e){
var e = e || window.event;
var elem = e.target || e.srcElement;
alert($(elem).html);
};
this does not seem to give me the innerHTML, while elem.innerHTML does.
any advice?
thanks,
Leon
--
View this message in context: http://www.nabble.com/how-to-get-innerHTML-from-an-external-bind%28%29--tp16352984s27240p16352984.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.