Tuesday, 15 January 2013

javascript - eventlistener / css pseudo class when scrollbar appears -


Is a JavaScript Eventil or CSS pseudo class when a scrollbar is visible and disappears? For instance the system's Mac OS, the scrollbar is hidden by default, when you start scrolling, they appear. For Windows Internet Explorer> = 10 also. I want to know that scrollbars are visible and disappear. My first test:

  var doscroll = false, $ html = $ ('html'), timer; $ (Window) .on ('scroll', function) {if (! Doscroll) {doscroll = true; $ html.addClass ('doscroll');} Clear timing (timer); timer = setTimeout (function () { Doscroll =); $ Html.removeClass ('doscroll');}, 2000);})  

But when I click on the scrollbar and do not scroll the timer, then DocSol-Class Removes, and I do not know the exact time of time to remove the DSC.

Is there any better solution / idea?

Thanks Oliver

No scrollbars depend on implementation.

Says

scrolling mechanism depends on UA. The most common mechanism is a scrollbar, but panars, hand cursors, page flickers, etc. are also possible.

Therefore, there are no scroll bars in some implementations, and some others, but they are not hidden anywhere. Thus there will be no meaning in this incident.


No comments:

Post a Comment