views:

60

answers:

1

I have sortable divs and in this divs - paragraphs. If I use mouseenter event to check if the mouse is in this divs - it doesn't work. I.e Sortable + mouseenter on the sortable elements = doesn't work. How can I fix it?

Here you are some code

$("#sort").click(function() {



            $("#ps").sortable();
            $("#ps").disableSelection();


    });

When click on div with id sort - the divs in #ps become sortable.

<div id="ps" style="border:1px solid red;">
<div class="happy" style="border:1px solid red;width:100px;">
<p>
dasdasdasdas
</p> 
</div>
<div class="happy" style="border:1px solid red;width:100px;">
<p>
1234
</p>
</div>
</div>

And

$(".happy").mouseenter(function() {
    alert("OK");
});
A: 
$(".happy").live('mouseover',function() {
 alert("OK");
});

This is the solution.

P.S This problem occurs also with click and hover events.

Angel Angelov