Hai everybody.

if rotate =true
how to disbale draggable function

this is my code

but rotate working fine.

draggable function not disable and enable
anybody plz help me.

$('.planspace-image').draggable({});

        //.resizable();

                $('.upload_pic')
    .resizable({

        start: function(e, ui) {


        },
        resize: function(e, ui) {

        },
        stop: function(e, ui) {
            //alert('resizing stopped');
        }
    });

    var rotate = false;
    var drag = true;
    $('.rotate').mousedown(function()
    {

    //   start:$('.upload_pic').mousedown(function(e) {
       //$(document).mousedown(function(e) {
        //alert("hai");
        //e.preventDefault();
        rotate=true;

            $(document).mousemove(function(e2) {
                $('.planspace-image').draggable({disable: true});

                if(rotate == true )
                {
                rotateOnMouse(e2,$('.upload_pic'));
                } 

            });

         $(document).mouseup( function() {

        rotate = false;
             $('.planspace-image').draggable({disable: false});

    });  

The option is called disabled not disable.

$('.planspace-image').draggable({ disabled: true });

hai ,

Thanks ,but still,i have same problem.
image not dragging after rotation false

what is the problem plz help me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.