4
Here’s what I’m trying to do:
I got a looping coming from the database.
When I click on a button of one of the results, I wanted to make a fadein div appear.
Turns out when I click on one, the div shows up at all.
How do I make clicking on the first div, for example, appear only on this div and not at all?
UPDATING
Let’s go to HTML code, it’s a bit messy:
<div class="bloco_white_middle shadow user">
<div class="bl_conf_user j_conf">
<p class="block_username">
Excluir o Usuário(a) <b>Leandro?</b>
</p>
<div class="block_buttons">
<a href="usuario_listar.php?acao=excluir&id=1" title="Desativar Usuário" class="btn_middle_icon btn_aprovar" style="margin-right:5px;">
<div class="icon-ok"></div>Sim
</a>
<a href="usuario_listar.php" title="Excluir Usuário" class="btn_middle_icon btn_excluir" id="btn_no">
<div class="icon-remove"></div>Não
</a>
</div>
</div>
<strong>Nome:</strong> <em>Leandro</em>
<p style="margin-top:6px;">
<strong>Data registro:</strong> <em>10/05/2013</em>
</p>
<p style="margin-top:6px;">
<strong>Último acesso:</strong> <em>12/12/2013</em>
</p>
<p style="margin-top:6px;">
<strong>Acesso:</strong><em>Usuário</em>
</p>
<a href="usuario_listar.php?acao=desativar&id=1" title="Desativar Usuário" class="btn_middle_icon btn_aprovar" style="margin-right:5px;">
<div class="icon-ok"></div>Ativo
</a>';
<a href="usuario_listar.php?acao=excluir&id=1" title="Excluir Usuário" class="btn_middle_icon btn_excluir" style="margin-right:10px;" id="btn_exc">
<div class="icon-trash"></div>Excluir
</a>
</div>
Then you have the jquery code:
<script type="text/javascript">
$(document).ready(function(){
$('.j_conf').hide();
$('#btn_exc').live('click', function() {
$('.j_conf').fadeIn("slow");
return false;
});
$('#btn_no').live('click', function() {
$('.j_conf').fadeOut("slow");
return false;
});
});
</script>
Actually, I am trying to make a confirmation to delete or not a user!
Please post some code that demonstrates how you are building your solution. Not knowing how you’re doing, we have to do a little guessing to help you ;)
– Oralista de Sistemas
Welcome! Regarding your question: Not seeing your code doesn’t help much. Put here the part of the code with Event Handler and the HTML structure of the Divs that refers.
– Sergio