javascript - How to stop incrementing a variable when drop in same dropspot -
I have 7 droppots and 7 dragable elements I can use the same element for all 7 dragpots or I I can use all the draggable elements on the same drawspot. I have an extreme contor which is an increase in the drop but, if I drag all the elements on the same dropopsot it reaches the variable 7 and something happens. I need to increment the drop-once per bar once for the variable, even if I change the drops and src 7 times in the same droppings. My code looks like this:
drop: function (Event, UI) {dropTarget = event.target.id; IndexDrops = dropTarget.charAt (dropTarget.length-1); $ ("#dropSpot" + IndexDrop). CSS ("Opacity", 0); $ ("#droppot" + indexdrops). Children ("IMG"). Prop ('src', dragregras.rc); Interval = set interval (Shodrock, 1); $ (Object-tooth [indexdes]). CSS ('visibility', 'visible'); CONTOR ++; If (contor == 7) {resetBtn.disabled = false; $ (DragObjects) .draggable ("disabled"); UpdateBubble (2); }; }
You really need to read in your code Many false things ...
1 - Do not select the group with the id:
Comments
Post a Comment