highlight selected grid row in jquery
I am trying to highlight the selected row in a grid thru jquery.
$('#myGrid tr').click(function() {
$('#<%=imyGrid.ClientID%> tr').removeClass("selected");
$(this).addClass("selected");
});
and I've edite开发者_Python百科d jquery-ui.css [d/led and added locally inside styles folder of solution) as follows:
.selected{
background-color:Gray;}
but the click still doesn't highlight the row. I tried the same by created a nother website with an aspx page and it worked ok.
It is possible you have another css rule defined that has a higher precedence than .selected
if you want to override that precedence you can use !important
.selected{
background-color:Gray !important;
}
精彩评论