javascript - Yelp mouse tracking mechanism -


i realized yelp.com kind of tracking when mouse move or happens (click in element). how this? there library? how without 0 performance impact?

you can see console in firebug below:

enter image description here

a basic implementation of mouse tracking this: http://jsfiddle.net/pksah/

html:

<body>     <div id="container"></div> </body> 

js:

currentposition = null; $("#container").on("mousemove", function (event) {     currentposition = event; });   setinterval(function () {     console.log(currentposition.pagex + "," + currentposition.pagey); }, 1000) 

css:

#container {     width:100%;     height:300px;     background:yellow; } 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -