Gracias Alexis, pero no consigo que funcione:
Código Javascript
:
Ver original$("#tabl tr").hover(function(){
$(this).css("background", "#B9F8F8");
}, function(){
$(this).css("background", "#FFF");
});
function filtrar()
{
$.ajax({
data: $("#frm_filtro").serialize()+ordenar,
type: "POST",
dataType: "json",
url: "ajax.php?action=listar",
beforeSend:function(){
$('.carga1').css('display','block');
$('.carga1').html("<img src='imagenes_menu/ajax-loader4.gif' align='center' /><br />Cargando...");
},
complete: function() {
$(".carga1").show();
$(".carga1").hide();
},
success: function(data){
var html_user ='' ;
if(data.length > 0){
$.each(data, function(i,item){
html_user += ' <body>';
html_user += '<form action="prod_sppb.php" method="post" name="nombreform">';
html_user += '<table id="tabl">';
html_user += '<tr bgcolor=#DFEBFF onMouseOver="ini()" ondblclick="pulsar(this, '+ String.fromCharCode(39) + item.id_aviso +String.fromCharCode(39) + ');" >';
html_user += '<td style="'+item.style+'"><input name="demo" type="checkbox" value="' + item.id_aviso + '"/></td>';
html_user += '<td style="'+item.style+'">'+item.id_aviso+'</td>';
html_user += '<td style="'+item.style+'">'+item.telefonos+'</td>';
html_user += '<td style="'+item.style+'">'+item.name+' '+item.apellidos+'</td>';
html_user += '<td style="'+item.style+'">'+item.calle+'</td>';
html_user += '<td style="'+item.style+'">'+item.localidad+'</td>';
html_user += '<td style="'+item.style+'">'+item.aparatos+'</td>';
html_user += '<td style="'+item.style+'">'+item.marcas+'</td>';
html_user += '</tr>';
html_user += '</table>';
html_user += '</form>';
html_user += '</body>';
Este ejemplo tampoco me funciona:
Código Javascript
:
Ver original<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script type = "text/javascript" src = "http://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$("#tabl tr").hover(function(){
$(this).css("background", "#B9F8F8");
}, function(){
$(this).css("background", "#FFF");
});
</script>
</head>
<body>
<table id="tabl" border = 1>
<tr>
<td>UNO</td>
<td>DOS</td>
<td>TRES</td>
<td>CUATRO</td>
</tr>
<tr>
<td>UNO</td>
<td>DOS</td>
<td>TRES</td>
<td>CUATRO</td>
</tr>
<tr>
<td>UNO</td>
<td>DOS</td>
<td>TRES</td>
<td>CUATRO</td>
</tr>
</table>
</body>
</html>