diff --git a/12/dragable.js b/12/dragable.js index 704b94b..b3d1405 100644 --- a/12/dragable.js +++ b/12/dragable.js @@ -1,8 +1,8 @@ - function makeDragable(dragHandle, dragTarget) { - let dragObj = null; //object to be moved - let xOffset = 0; //used to prevent dragged object jumping to mouse location - let yOffset = 0; +function makeDragable(dragHandle, dragTarget) { + var dragObj = null; //object to be moved + var xOffset = 0; //used to prevent dragged object jumping to mouse location + var yOffset = 0; document.querySelector(dragHandle).addEventListener("mousedown", startDrag, true); document.querySelector(dragHandle).addEventListener("touchstart", startDrag, true);