Response title
This is preview!
Can
you please let me know if it is possible to detect the 40% in the
Middle of a Div Using jQuery for example in following example I need
to enable the mousemove()
only
on 30% left side or 30% of the right side of the center.
$('#box-wrap').mousemove(function(e){
var x = e.pageX - this.offsetLeft;
var y = e.pageY - this.offsetTop;
console.log("X: " + x + " Y: " + y);
});
html, body{
width:100%;
height:100;
}
#box-wrap{
height:400px;
width:100%;
background:yellow;
}
<div id="box-wrap"></div>
© 2013 jQuery Foundation
Sponsored by and others.