I have to change the table row color based on some business logic. I have limited access.
I have PHP code which decide TD content…from that TD I have to change the current TR background color.
jQuery can help, as it is having lot of traverser and accesser.
code I am writing is
<script type="text/javascript">$(this).closest("td").css("border", "1px solid red");</script>
But not able to access the current TD or TR
here you can use parents() funciton.
if your element is $(‘#el’) then following will give you nearest td and tr
then you can apply operation like below