What are the best cursor (mouse) tracking applications for web sites? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 12 months ago.
开发者_如何学PythonThe community reviewed whether to reopen this question 12 months ago and left it closed:
Improve this questionOriginal close reason(s) were not resolved
What are the best cursor (mouse) tracking Javascript applications for web sites? To be stored in a database...
I don't know that there is a pre-packaged general solution to this problem one-click away.
I would recommend picking a good Javascript framework (my personal favorite is MooTools, but jQuery is nice too). Both of these libraries provide nicer ways of handling mouse events in a cross-browser compatible manner.
My advice: Keep a queue of mouse events that you constantly push to a server via AJAX calls. The server-side script that answers the AJAX request can push the data into a database of your choosing.
Take a look at this nice MooTools library for handling advanced mouse gestures to get a good feel of how you might accomplish the mouse movement recording: Moousture.
Edit: After a little more Googling I also came across a MooTools Flashlight Effect which does almost exactly what you want. Instead of updating the position of the flashlight based on mouse movement, you would store the coordinates in a queue that gets pushed to a server later.
精彩评论