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:

Cookies, anyone?

  Our application started having integration issues early March this year. Did I say that was intermittent? To add to our confusion, we coul...