<table cellspacing="2" cellpadding="2" align="Center" border="0" id="ctl00_centerContent_GridView1" style="border-color:Gray;border-width:1px;border-style:solid;">
<tbody>
<tr style="background-color:SeaShell;">
<td class="nonpar" style="color:Red;font-weight:bold;"><a href="javascript:void(0);" style="color: black; cursor: default;">Entry #1</a></td>
<td align="center" style="color:Red;"> </td>
<td align="center">N</td>
<td> </td>
</tr>
<tr style="background-color:SeaShell;">
<td class="nonpar" style="color:Red;font-weight:bold;"><a href="javascript:void(0);" style="color: black; cursor: default;">Entry #2</a></td>
<td align="center" style="color:Red;"> </td>
<td align="center">N</td>
<td> </td>
</tr>
<tr style="background-color:SeaShell;">
<td class="nonpar" style="color:Red;font-weight:bold;"><a href="javascript:void(0);" style="color: black; cursor: default;">Entry #3</a></td>
<td align="center" style="color:Red;"> </td>
<td align="center">Y</td>
<td> </td>
</tr>
<tr style="background-color:SeaShell;">
<td class="nonpar" style="color:Red;font-weight:bold;"><a href="javascript:void(0);" style="color: black; cursor: default;">Entry #4</a></td>
<td align="center" style="color:Red;"> </td>
<td align="center">Y</td>
<td> </td>
</tr>
</tbody>
</table>
I am setting the Url, the color, and the cursor through a JQuery:
$("#ctl00_centerContent_GridView1 tr td a").each(function () {
var url = $(this).attr("href");
var cid = getParameterByName(url, 'ccid');
if (cid == "34" || cid == "37") {
$(this)
.attr('href', 'javascript:void(0);')
.css({ color: 'black', cursor: 'default' });
}
});
How can I modify the code so if the query string is 34
or 37
and if the third column is a Y make the font color red instead of black otherwise make the font color red. Leave everything else in the code as is.