I am looking to select the last td in each row and using this css selector right now .table td:last-child but it doesnt work in IE so is there any way I can select through javascript (WITHOUT ANY FRAMEWORK) for IE? to apply CSS styles.
I am looking to select the last td in each row and using this
Share
Example: http://jsfiddle.net/JsyYR/
EDIT: If you’ll be running this in all browsers, it may be safer to do this:
Example: http://jsfiddle.net/JsyYR/2/
This is because some browsers will insert a text node if there’s any space between the last
</td>and the closing</tr>. As such,lastChildwouldn’t work.