views:

55

answers:

1

Good morning,

i hope someone can help me.

My Problem: The sortable event out: fires when i drag something in the list or when i sort the list. But i only want to start the function when i drag a item out.

My code

        $(document).ready(function ust()
        {    
            $('#div1').sortable({
                out: function(event, ui) { $('#nfo').append('OUT<br />'); }
            });

        });

Working example http://jsfiddle.net/FrbW8/22/

kind regards Peter

A: 

This is the default behaviour of the out callback. See this jquery ui trac ticket

I really do not agree with the 'logical' behaviour notion.

"However, note that the "out" callback will still be triggered if you drag into a list and then release the mouse (but not if you're not over the list). This is logical behaviour and happens for normal sortables as well."

redsquare
is it possible to stop the fire? For example, i add sortstart and sortstop. -> If sortart: -> abbort out: ... if sortstop: -> abbort out:
Peter
That will get messy I think. You could try need to get your hands dirty and change the jquery ui src to stop this 'out' behaviour.
redsquare
Hey redsquare,but when i change the src, i must change it after every ui update. :(Right?
Peter
@Peter yes, that is the downside - unless you submit a ticket with the change if you believe it is wrong and they include it in the next release
redsquare
And there is no other way? For exmaple: destroy sortable -> make dragable? ... Jquery is a little bit new 4 me, so i dont know every possible approach. :(
Peter