简体   繁体   中英

can't disable droppable in jquery ui

I am using jquery ui Draggable and Droppable in my web application to drag divs and drop them,

But when I drop the items on the droppale area (they are sometimes textboxes or textareas) I can't react with them any more or drag them further, its like they are consumed in that part of the page.

other thing is that I decided to totaly disable the droppable but still the div keeps dropping stuff on it and consuming them, i tried also to delete the droppable event from the code and run it again still the same thing keeps happenning.

but when i drag them to other parts of the page the drag works fine. I also tried to run on several machines but still same output.

what could be the cause of the problem ?

code for creating the draggables

$('body').append("<div id='addNewText'></div>");
    $("#addNewText").draggable();

code for creating the droppable page but when I deleted the droppable part.

$("#book").append("<div name=\"page\" id =\"page"+(pagesNumber+1)+"\"> </div>");
    $("#page"+(pagesNumber+1)).css("position","absolute");

尝试设置“禁用”属性,如下所示:

$("#addNewText").droppable('option', 'disabled');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM