Posted by danshaw on December 13, 2012 at 2:05am
I have a drupal 7 view that is outputting the titles of nodes which is in table form.
<table class="views-table cols-0" thmr="thmr_80">
<tbody>
<tr class="odd views-row-first">
<td class="views-field views-field-counter">
<a href="#">Link 1</a>
</td>
</tr>
<tr class="even">
<td class="views-field views-field-counter">
<a href="#" class="active">Link 2</a>
</td>
</tr>
</tbody>
</table>Drupal gets me close by adding "active" class to the link (Link 2), but I would like it for the entire row (TR). Any way to customize this?
Thanks guys!
Comments
If anyone has this issue
If anyone has this issue also, I was able to figure it out with some jquery. Just put this at the top of your page:
$(function() {
$('.views-table a.active').closest('tr').addClass('active_row');
});
Then the active row will have "active_row".