I need to detect when the cursor is hovering over the scrollbar. I'm using Chrome and jQuery. This works in Firefox but not in Chrome: http://jsfiddle.net/HQrrq/1/
The essence is:
$(document).mousemove(function(mouseMoveEvent){
console.log(mouseMoveEvent.pageY);
});
So, simple question: how to I get the mouse position when hovering over the document scrollbar in Chrome?
Could be a kind of workaround: {looks like need to handle some window resize too!}
http://jsfiddle.net/HQrrq/3/
var loremContainer = $('#loremContainer')[0],
scrollbarWidth = loremContainer.offsetWidth - loremContainer.clientWidth,
scrollbarHeight = loremContainer.offsetHeight - loremContainer.clientHeight;
$('#loremContainer').height($(window).height() - scrollbarHeight).width($(window).width() - scrollbarWidth);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With