slang's solution to "Re-write jQuery script to animate an element based on mouse movement. "

I edited your code and this works: https://gist.github.com/3915084 . However, it is *really* laggy because every single mouse movement triggers your function, so because the script needs to catch up, the delay ends up being more than 1000ms. I will continue to edit the gist to make the code more efficant...
I edited your code and this works: https://gist.github.com/3915084 . However, it is *really* laggy because every single mouse movement triggers your function, so because the script needs to catch up, the delay ends up being more than 1000ms. I will continue to edit the gist to make the code more efficant...... **EDIT:** I switched to using setInterval to improve speed, now I just need to add the 1000ms delay before hiding.
I edited your code and this works: https://gist.github.com/3915084 . However, it is *really* laggy because every single mouse movement triggers your function, so because the script needs to catch up, the delay ends up being more than 1000ms. I will continue to edit the gist to make the code more efficant... **EDIT:** I switched to using `setInterval()` to setInterval to improve speedperformance, now I just need to add the 1000ms delay before hiding.. **EDIT:** It's working perfectly! :)
I edited your code and this works: https://gist.github.com/3915084 . However, it is *really* laggy because every single mouse movement triggers your function, so because the script needs to catch up, the delay ends up being more than 1000ms. I will continue to edit the gist to make the code more efficant... **EDIT:** I switched to using `setInterval()` to improve performance, now I just need to add the 1000ms delay before hiding. **EDIT:** It's working perfectly! :)! :) You can see it working [here](http://jsfiddle.net/slang800/Q6eTV/)
I edited your code and this works: https://gist.github.com/3915084 . However, it is *really* laggy because every single mouse movement triggers your function, so because the script needs to catch up, the delay ends up being more than 1000ms. I will continue to edit the gist to make the code more efficant... **EDIT:** I switched to using `setInterval()` to improve performance, now I just need to add the 1000ms delay before hiding. **EDIT:** It's working perfectly! :) You can see it working [here](http://jsfiddle.net/slang800/Q6eTV/4/)
I edited your code and this works: https://gist.github.com/3915084 . However, it is *really* laggy because every single mouse movement triggers your function, so because the script needs to catch up, the delay ends up being more than 1000ms. I will continue to edit the gist to make the code more efficant... **EDIT:** I switched to using `setInterval()` to improve performance, now I just need to add the 1000ms delay before hiding. **EDIT:** It's working perfectly! :) You can see it working [here](http://jsfiddle.net/slang800/Q6eTV/4/)/). I also made it hide when the mouse is moved outside of the browser window, using jQuery's `mouseout()`.

User: slang

Question: Re-write jQuery script to animate an element based on mouse movement.

Back to question