将此样式添加到您的 CSS 规则中:
.btn-delete {
width: 14px; height: 14px;
margin: 38px 0 0 66px;
position: absolute;
}
.icon-remove { background-position: -312px 0; }
.icon-white { background-image: url('http://twitter.github.com/bootstrap/assets/img/glyphicons-halflings-white.png'); }
在你的 jQuery 中:
$(".galleria-image").append(
"<span class='btn-delete icon-remove icon-white'></span>");
$(".btn-delete").live("click", function() {
var img = $(this).closest(".galleria-image").find("img");
alert('Deleting image... ' + $(img).attr("src"));
return false;
});
这将执行以下操作:

现在,您可以简单地发送一个 ajax 请求$.get()
,例如,传递用户想要删除的图像的 ID/SRC 并刷新您的代码/删除属于该选定图像的所有图像。