ボタンをクリックしても、親 div は削除されず、何も呼び出されませんでした。
私の JavaScript 部分:
<script>
$(document).ready(function()
{
$('.delete').click(function() {
var parent = $(this).closest('div');
$.ajax({
type: 'get',
url: 'delete.php', // <- replace this with your url here
data: 'ajax=1&delete=' + $(this).attr('id'),
beforeSend: function() {
parent.animate({'backgroundColor':'#fb6c6c'},300);
},
success: function() {
parent.fadeOut(300,function() {
parent.remove();
});
}
});
});
});
そして私のHTML部分
<div>
Some name
<button type="submit" class="delete" value="Delete" id="multipleValues">Delete</button>
</div>
そして、この div は Jquery dynatree 拡張機能の中にあります