I am trying to add circles when the event mousedown is generated into the square-one (grey square) only. If the mouse hovers outside of the square-one, it should not insert any circles anywhere else such as square-two(green square). Question: How can I set the limits for the circles such that they are only inserted within the square-one boundaries? Thank you
Tag: onmousedown
JavaScript How to Dynamically Move Div by Clicking and Dragging
Okay it would seem like it should be simple. I need to take an already existing div and move it according to mouse position within the window. I have searched everywhere and it has led me to over-complicated ways of doing the same thing and involves the use of j-query. I need to strictly use javascript for what I am