<center>
<button class="btn btn-mini btn-red dropdown-toggle" data-toggle="dropdown">
<i class="icon-remove" rel="<?php echo $array[$i]->getId() ?>"></i>
</button>
</center>
And here my jquery code :
<script type="text/javascript">
$(document).ready( function () {
$('i.icon-remove').click(function(e) {
//$('i.icon-remove').live('click',function(e) {
e.preventDefault();
var id = $(this).attr("rel");
if(confirm('Voulez-vous supprimer ce couple mot-clé/nom de domaine ?')) {
var parent = $(this).parents("tr");
$.ajax({
type: "POST",
url: "requestsAjax.php",
data: "id="+id+"&act=suppr",
beforeSend: function() {
parent.animate({'backgroundColor':'#FF3F47'},300);
},
success: function(msg){
$(this).delay(1200,function(){
parent.slideUp(500,function() {
});
});
}
});
}
});
});
</script>
Can you help me please.