nickalchemist
nickalchemist

Reputation: 2241

textContent not working in IE. Need a generic code sample

parentId=$(this).closest('tr').find('td:nth(6)')[0].textContent;

I am trying to get ID from flexigrid column. It works fine in Chrome and Firefox but it throws error in IE- 'closest(...).find(...).0.textContent' is null or not an object.

Is there any substitute for textContent in IE? Or is there a way to make it generic to work in all the browsers?

PS: Am using IE8

Upvotes: 0

Views: 3042

Answers (1)

Joseph
Joseph

Reputation: 119867

are you looking for jQuery .text()?

$(this).closest('tr').find('td:nth(6)').text()

Upvotes: 2

Related Questions