help needed
help needed
hey all,
I'm using the following code to add the zebra effect in a table and to change the row color on mouseover.
- .mover
{
background-color:#0099CC;
}
.trclick
{
background-color:#00CCCC;
}
</style>
<script type="text/javascript">
function ser(){
$.ajax({ url: 'tableData.action', context: document.body, success: res});
}
function res(data){
document.getElementById("res").innerHTML = data;
$("#table1 tr:even").css("background-color", "#F4F4F8");
$("#table1 tr:odd").css("background-color", "#EFF1F1");
//handle the mouseover , mouseout and click event
$("#table1 tr").hover(
function () {
alert("over");
$(this).addClass("mover");
},
function () {
$(this).removeClass("mover");
});
However the mouse over change of class doesn't seem to work! But the alert at the mouseover works. Guess it's a css syntax issue?
thanks in advance!