views:

17

answers:

0

Hello. i have some problems with dragable UI. In some conditions i need to stop dragging. It is very dynamic. I try to give it more simple.

What i do:

drag : (function(e,ui){
           if (ui.position.left > 400){// in my example 400 is variable whitch calculates every drag event
                        return false;
      }            
}

But if i do this. When i returning false. All drag is stoping. And if i want to drag in another direction, i must do 'mouseup' and 'mousedown' again.

How can i create such behavior without stopping drag? Thanks