0
I have an application where I click on a table row, jquery takes the table row id, mounts a URL and put inside a href=''
The problem is I’m not getting it to work on the attr.(), I already tested on Chrome and in the Mozilla, works normal, but I need it to work in IE
PS.The application has to run on IE, and on version 8 !!!
Table (comes from an external page via Ajax)
foreach ($retorno as $valor) {
$html.= "<tr class='codFuncionario' codigo=".$valor['codigo'].">";
$html.= "<td>".$valor['nome']."</td>";
$html.= "<td>".$valor['drt']."</td>";
$html.= "<td>".$valor['cpf']."</td>";
$html.= "<td>".$valor['setor']."</td>";
$html.= "<td>".$valor['cargo']."</td>";
$html.= "<td>".$valor['turno']."</td>";
$html.= "</tr>";
}
echo $html;
Script
$(document).on("click", ".codFuncionario", function(e){
e.preventDefault;
var codFuncionario = $(this).closest('tr').attr('codigo');
//alert(codFuncionario);
$(".a_registrar_digital").attr('href', 'registrar_digital.php?codigo='+codFuncionario);
});
Html
<a href'' class='a_registrar_difital' target='end_font' >Click Aqui</a>
Someone there has faced the same problem as me and has a solution ???
Which version of jQuery are you using? 2.x is not compatible with IE8.
– bfavaretto
I’m using the 1.11.0
– Tafarel_Brayan
@Tafarel_brayan How are you testing if the
attr
works on IE8? You are inspecting with developer tools?– afsantos
You can put your HTML?
– Sergio
i rephrased the question by putting some other data...
– Tafarel_Brayan
@afsantos, yes I am using the tool for native IE developers (F12)
– Tafarel_Brayan