Sunday, 15 September 2013

Changing the draggable attribute

Changing the draggable attribute

I am making an maths puzzle page for kids. The answers are in s which drag
over the questions. When an answer is used, I would like to disable the
dragging of the specific answer. I can "dim" the answer and prevent it
from being dropped but thus far have found no way of preventing the from
being dragged.
Please help.... I would prefer not to use JQuery if possible
function handledrop(elt, evt) {
//Dim THE DRAGGED ITEM
dragitem.style.opacity=0.4; //***********This works
dragitem.style.hidden="true";//***********This doesn't or any
variation I an think of
//***********dragitem.draggable="false"
//***********dragitem.style.draggable="false"
//***********dragitem.draggable="false"
dragitem.ondrag = "donothing()";
dragitem.ondragstart="donothing()" ;
}

No comments:

Post a Comment