Recently, I encountered a challenge with a table that had its border set as 1px solid silver from an external style sheet (a .css file over which I had no control).
The CSS code responsible for styling the table was as follows: my_table tbody td { font: 8.5pt verdana, sans-serif; border-top: solid 1px silver; border-bottom: solid 1px silver; overflow: hidden; padding: 0px 3px 0px 2px; }
My goal was to change the border color of the last row in the table to black using jQuery. The approach I initially took was this:
$('#table_1 tr:last').css('border', '1px solid black');
Unfortunately, this method did not yield the desired result. So, my question now is: How can I achieve this using JQuery or JavaScript?