I had a similar situation:
I believe that the scrollbar is not really part of the webpage - it is a component of the operating system level. However, I managed to get around my problem by observing the position of the mouse over the parent element (with the initial value of height and width via css - this may be optional, I'm not sure). My code below was used in a slightly different context, but I think it is applicable yet).
The width of the children is resized to fit the scrollbar (width is reduced by 18 pixels, in Chrome). However, the width of the parent / container remains the same width. Since it remains the same width, we can add the mousemove event and check if the cursor position falls within this 18px span, where the scroll bar is displayed in the child.
In addition, depending on what exactly you mean by the scroll bar (the entire drum, axis, buttons, thumb and all) or the components of the scroll bar, you can achieve functionality with some calculations.
Entire scroll bar - mouse pointer
$(".parent").bind("mousemove",function(e){ if($(".partent").width() <= e.offsetX){
Thumb scroll bar - mouse pointer
$(".parent").bind("mousemove",function(e){ if($(".child").width() <= e.offsetX){ var scrollbarHeight = $(".parent").height() - 36; //36 = height of both up and down arrows var scrollbarThumbHeight = scrollbarHeight/$(".child").height(); var scrollTopPosition = $(".parent").get(0).scrollTop; var relativeThumbPosition = (childScrollTop/$(".child").height()) + 18;//18 = offset from the up button if(e.offsetY >= relativeThumbPosition && e.offsetY <= relativeThumbPosition+scrollbarThumbHeight){ //display tooltip div }else{ //If displayed, hide tool-tip div } }else{ //If displayed, hide tool-tip div } });
Extra mouse
$(".parent").bind("mouseout",function(e){ if($(".child").width() <= e.offsetX){
I only tested this on Google-Chrome in Windows 7, I think that magic numbers (36.18) would need to be tweeked for different operating systems, but would be relatively similar in cost.