Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/01/2014, 02:55
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 7 meses
Puntos: 10
Respuesta: Iluminar filas

Gracias Alexis, pero no consigo que funcione:

Código Javascript:
Ver original
  1. $("#tabl tr").hover(function(){
  2.     $(this).css("background", "#B9F8F8");
  3. }, function(){
  4.     $(this).css("background", "#FFF");
  5. });
  6.  
  7.  
  8.  
  9.  
  10.  
  11. function filtrar()
  12.  
  13. {
  14.  
  15. $.ajax({
  16. data: $("#frm_filtro").serialize()+ordenar,
  17. type: "POST",
  18. dataType: "json",
  19. url: "ajax.php?action=listar",
  20. beforeSend:function(){
  21. $('.carga1').css('display','block');
  22. $('.carga1').html("<img src='imagenes_menu/ajax-loader4.gif' align='center' /><br />Cargando...");
  23. },
  24. complete: function() {
  25. $(".carga1").show();
  26. $(".carga1").hide();
  27. },
  28. success: function(data){
  29. var html_user ='' ;
  30. if(data.length > 0){
  31. $.each(data, function(i,item){  
  32.  html_user += ' <body>';
  33.  html_user += '<form action="prod_sppb.php" method="post" name="nombreform">';
  34.  html_user += '<table id="tabl">';
  35.  html_user += '<tr bgcolor=#DFEBFF onMouseOver="ini()"  ondblclick="pulsar(this, '+ String.fromCharCode(39) + item.id_aviso +String.fromCharCode(39) + ');" >';
  36.  html_user += '<td style="'+item.style+'"><input name="demo"  type="checkbox" value="' + item.id_aviso + '"/></td>';
  37.  html_user += '<td  style="'+item.style+'">'+item.id_aviso+'</td>';
  38.  html_user += '<td  style="'+item.style+'">'+item.telefonos+'</td>';
  39.  html_user += '<td  style="'+item.style+'">'+item.name+' '+item.apellidos+'</td>';
  40.  html_user += '<td  style="'+item.style+'">'+item.calle+'</td>';
  41.  html_user += '<td  style="'+item.style+'">'+item.localidad+'</td>';
  42.  html_user += '<td  style="'+item.style+'">'+item.aparatos+'</td>';
  43.  html_user += '<td  style="'+item.style+'">'+item.marcas+'</td>';
  44.  html_user += '</tr>';
  45.  html_user += '</table>';
  46.  html_user += '</form>';
  47.  html_user += '</body>';



Este ejemplo tampoco me funciona:

Código Javascript:
Ver original
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset=utf-8 />
  5. <title>JS Bin</title>
  6. <script type = "text/javascript" src = "http://code.jquery.com/jquery-1.10.2.js"></script>
  7. <script>
  8. $("#tabl tr").hover(function(){
  9.   $(this).css("background", "#B9F8F8");
  10. }, function(){
  11.   $(this).css("background", "#FFF");
  12. });
  13. </script>
  14. </head>
  15. <body>
  16.   <table id="tabl" border = 1>
  17.     <tr>
  18.       <td>UNO</td>
  19.       <td>DOS</td>
  20.       <td>TRES</td>
  21.       <td>CUATRO</td>
  22.     </tr>
  23.    
  24.     <tr>
  25.       <td>UNO</td>
  26.       <td>DOS</td>
  27.       <td>TRES</td>
  28.       <td>CUATRO</td>
  29.     </tr>
  30.    
  31.     <tr>
  32.       <td>UNO</td>
  33.       <td>DOS</td>
  34.       <td>TRES</td>
  35.       <td>CUATRO</td>
  36.     </tr>
  37.   </table>
  38. </body>
  39. </html>

Última edición por satjaen; 07/01/2014 a las 04:03