Alex,
nvl corrected me on text() - confused its functionality with html() for a minute, so what you have likely should be returning something.
Try wrapping your code in this:
$(document).ready(function() {
// Your code here
});
If you don't do this, you're probably getting back a null response because the browser doesn't actually have any HTML content yet to perform your function on!
Details here:
http://www.learningjquery.com/2006/09/introducing-document-ready
Sample working HTML doc using this:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var someText = $("table tr td").text();
alert(someText);
});
</script>
</head>
<body>
<table>
<tr>
<td>help</td>
<td>me</td>
</tr>
</table>
</body>
</html>
Does indeed output 'helpme' in an alert box.