event.target doesn't work
- by rdesign
Hey guys,
I've wrote some jquery code with some draggable elements and one droparea.
Unfortunately my droparea can't make a difference between various object.
Here's my code.
<script type="text/javascript">
$(function() {
$("#droparea").droppable({
drop: function(event) {
var $target = $(event.target);
if($target.is("#flyer")) {
alert("adasd");
}
}
});
});
</script>
</head>
<body>
<div id="droparea"></div>
<div class="polaroid" id="flyer">
<img src="images/muesliFlyer.png" alt="flyer" />
</div>
Without the if it works. But then I can't get the dropped object.
Any ideas why my target isn't recognized?
thanks a lot.