does anyone know what it is that i’m doing wrong?
I’m trying to have the “minus.png” on click, it’ll delete the DIV, however if you click the div text, it deletes the div.
I don’t want to be able to click the div and delete it on pulsate, I want to be able to click the minus png image, and it deletes it, would you happen to know what it is that I’m doing wrong?
I’m sure it’s a simple fix, but it’s bugging me badly haha!
Thanks!
<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>
FULL code is here:
Maybe
$(".pane")->$(".pane > a")http://jsfiddle.net/CgPJv/6/
You’re binding clicks on the whole div, instead bind them on the a element just like you said