Wednesday, January 08, 2014

Getting content inside a table cell using jQuery

I had a requirement of extracting the contents inside a table cell.
Suppose we have a table like below:
Here I am

Simple enough, the jQuery script goes like:
var tdContent = $('.someCSS').context.innerHtml();

Lo! We get the "Here I am" text.

1 comment: