1

i want to make a program in javascript simply structured in this way:

<div id="main">
 <div id="firstDiv"></div>
 <div id="secondDiv"></div>
</div>

the mouse pointer can be moved without problem in the secondDiv but when i'll try to enter in the firstDiv the mouse pointer must stop around the border of it. How can i do that?

farso92
  • 41
  • 5
  • show more your code. – Denny Sutedja Oct 26 '16 at 08:19
  • I really hope that there's no way to do this, it is already unsettling to search for the close buttons in those ads... – Theodore K. Oct 26 '16 at 08:23
  • Possible duplicate of [JavaScript - How to stop mouse movement](http://stackoverflow.com/questions/13415345/javascript-how-to-stop-mouse-movement). tl;dr not possible. You can however e.g. hide the mouse when appropriate. – NiFi Oct 26 '16 at 08:23
  • You can make the div move when the mouse moves over it. But we all know everthing is possible keep searching my friend. – N. Smeding Oct 26 '16 at 08:28
  • Wouldn't it be easier just to prevent mouse click in the element? What's the problem that you want to solve? – Theodore K. Oct 26 '16 at 08:33

0 Answers0