有谁知道我做错了什么?
我试图点击“minus.png”,它会删除 DIV,但是如果你点击 div 文本,它会删除 div。
我不希望能够单击 div 并在脉动上将其删除,我希望能够单击减号 png 图像并将其删除,您会碰巧知道我做错了什么吗?
我敢肯定这是一个简单的修复,但它让我很烦恼哈哈!
谢谢!
<script>
$(document).ready(function() {
$(".pane").click(function () {
$(this).effect("pulsate", { times:2 }, 0000).fadeOut('slow').parents(".pane");
});
});
</script>
<div class="pane">
<a href=""><img align="right" src="http://uploadir.com/u/6hmr4fr1" alt="delete" class="delete" /></a>
Simple jQuery script I'm learning to work with, you mad bro?
</div>
<div class="pane">
<a href=""><img align="right" src="http://uploadir.com/u/6hmr4fr1" alt="delete" class="delete" /></a>
Simple jQuery script I'm learning to work with, you mad bro?
</div>
<div class="pane">
<a href=""><img align="right" src="http://uploadir.com/u/6hmr4fr1" alt="delete" class="delete" /></a>
Simple jQuery script I'm learning to work with, you mad bro?
</div>
<div class="pane">
<a href=""><img align="right" src="http://uploadir.com/u/6hmr4fr1" alt="delete" class="delete" /></a>
Simple jQuery script I'm learning to work with, you mad bro?
</div>
完整代码在这里: