I try to understand, what is difference between e.pageX and e.clientX properties, I have wrote code below and put e.pageX and e.clientX, but nothing happens, nothing difference. Can somebody help me?
Thanks.
<!DOCTYPE html>
<html>
<head>
<script src="jquery-1.10.2.js"></script>
<script>
$(function () {
$("div").mousemove(function (e) {
var pageCoord = "( " + e.pageX + ", " + e.pageY + " )";
$("span").text("Page coords " + pageCoord);
});
});
</script>
<style>
div {
background-color: Yellow;
width: 300px;
height: 300px;
position:fixed;
}
span
{
position:fixed;
}
body {
height: 2000px;
padding:0;
margin:0;
}
</style>
</head>
<body>
<div></div>
<span>Coords</span>
</body>
</html>