https://i.sstatic.net/4ELuv.jpg
When a user clicks on a column to sort, the color of the column changes or highlights the row. In my tablesorter with ascending and descending sorting capabilities, I want the sorted column to change colors for better visibility.
<table border="0" cellpadding="0" cellspacing="0" class="tablesorter">
<thead>
<tr>
<th>Study ID</th>
<th>Study Title & Description</th>
<th>Route</th>
<th>Indication1</th>
<th>Therapeutic Area</th>
<th>Molecule</th>
</tr>
</thead>
An attempt was made to highlight the sorted column row using this script:
- Unfortunately, it did not work as expected.
This functionality is being implemented in grails 2.1.1 javascript.
I attempted another approach using the following script:
<script>
$( "#th1" ).click(function() {
alert("dsdsf");
$("th").css({"font-color": "yellow", "font-size": "20%"});
});
</script>
<thead>
<tr>
<th id="th1">Study ID</th>
<th>Study Title & Description</th>
<th>Route</th>
<th>Indication1</th>
<th>Therapeutic Area</th>
<th>Molecule</th>
</tr>
</thead>