Hola gente de js, necesito si me pueden ayudar en algo.
en una serie de <tr>'s tengo estos estilos, no es mas que un hover:
Código CSS:
Ver originaltable#feedback-list tbody tr{ background:white; background-image:url(../images/bg_table_presupuestos.jpg); background-repeat:repeat-x; background-position:bottom; }
table#feedback-list tbody tr:hover{ background:lightgray; background-image:url(../images/bg_table_presupuestos_on.jpg); }
luego tengo este metodo:
Código Javascript
:
Ver originalfunction openDiv(id_div, total_bids, id_shipment){
//dialogBidDetails ES UN DIV, PREGUNTO SI ESTA VISIBLE Y LO OCULTO
//LUEGO LE DEVUELVO LOS ESTILOS ORIGINALES AL TR
if(document.getElementById('dialogBidDetails'+id_div+'_'+id_shipment).style.display == 'table-row'){
document.getElementById('dialogBidDetails'+id_div+'_'+id_shipment).style.display = 'none';
document.getElementById('bid_'+id_div+'_'+id_shipment).style.background= '#E4E4E4';
document.getElementById('bid_'+id_div+'_'+id_shipment).style.backgroundImage= "url(images/bg_table_presupuestos.jpg)";
document.getElementById('bid_'+id_div+'_'+id_shipment).style.backgroundRepeat= "repeat-x";
document.getElementById('bid_'+id_div+'_'+id_shipment).style.backgroundPosition= "bottom";
}else{
//SI EL TR NO ESTA VISIBLE PRIMERO LE DEVUELVO A TODOS LOS TR SUS ESTILOS ORIGINALES Y LOS OCULTO
for(var i=1; i<=total_bids; i++){
if(document.getElementById('dialogBidDetails'+i+'_'+id_shipment).style.display == 'table-row'){
document.getElementById('dialogBidDetails'+i+'_'+id_shipment).style.display = 'none'
document.getElementById('bid_'+i+'_'+id_shipment).style.background= '#E4E4E4';
document.getElementById('bid_'+i+'_'+id_shipment).style.backgroundImage= "url(images/bg_table_presupuestos.jpg)";
document.getElementById('bid_'+i+'_'+id_shipment).style.backgroundRepeat= "repeat-x";
document.getElementById('bid_'+i+'_'+id_shipment).style.backgroundPosition= "bottom";
}
}
//POR ULTIMO MUESTRO EL TR SELECCIONADO
document.getElementById('dialogBidDetails'+id_div+'_'+id_shipment).style.display = 'table-row';
//Y LE DOY EL ESTILO DEL HOVER AL TR SELECCIONADO
document.getElementById('bid_'+id_div+'_'+id_shipment).style.background= 'lightgray';
document.getElementById('bid_'+id_div+'_'+id_shipment).style.backgroundImage= "url(images/bg_table_presupuestos_on.jpg)";
}
}
lo que hace es que quede seleccionado el <tr> en donde el usuario hizo un click, si se hace click en el mismo tr este vuelve con estilos origonales y asi. funciona perfecto, pero........
pero problema es que se me va el estilo del hover table#feedback-list tbody tr:hover
que demonios tengo que hacer? si le devuelvo todos sus estilos al tr cuando no esta mas seleccionado
ayuda