How to check if div is visible to user or not?

Basically i have a notification in the slide bar which is by default not visible(toggled).When any notification comes , it gets populated in the slidebar and on click of a toggle button slide bar opens from right to left.How can i make sure whether user has viewed a particular notification in slideBar.

something similar to this link i have done.

On click of the toggle on top right the slide bar will open and the notification will be visible .how to know that state ??


如果你使用jQuery,你可以做类似的事情

if($(element).is(':visible')) {
    // Hello
}
链接地址: http://www.djcxy.com/p/14638.html

上一篇: 在外窗高度位置计数div

下一篇: 如何检查div是否对用户可见?