0
I’m using the remote
$("#teste").load(location.href+" #teste>*",{id : idd});
The command updates the data div
group and send a parâmetro
for the same.
The div
, has class, commands jquery
that interacts with the user. When loading the screen after the execution of the command, and if the above command is again executed, the jquery
, styles, etc no longer work.
Example:
HTML:
<div id="teste">
<input type="button" value="Clique aqui para Apagar o Resgistro 1" class="btn">Registro 1
<input type="button" value="Clique aqui para Apagar o Resgistro 10" class="btn">
<input type="button" value="Clique aqui para Apagar o Resgistro 20" class="btn">
</div>
Clicking on a button executes the code below.
JS:
function() {
$.ajax({
url: "Registros.php",
data: {ta : tipoacao, dados : dados},
type: "POST"
})
.done(function(data) {
$("#teste").load(location.href+" #teste>*",{id : ta});
})
.error(function(data) {
});
});
Resultado (clicou para apagar o Registro 1)
<div id="teste">
<input type="button" value="Clique aqui para Apagar o Resgistro 10" class="btn">
<input type="button" value="Clique aqui para Apagar o Resgistro 20" class="btn">
</div>
Shows without record 1, but when clicking again on some button no longer calls the ajax, no more style on the button.
Update a div with load ? For me load loads an external file, try to improve your question explaining what you are trying to do and post a code that can reproduce the problem
– Gabriel Rodrigues
example posted @Highlander
– lelopes
@Highlander that’s right. Loads an external file. In this case I use to reload part of the same file in question. When reloading that part of the file as reported, the buttons no longer work, js no longer works .
– lelopes