0

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 ??

Alok
  • 512
  • 1
  • 3
  • 15

1 Answers1

0

If you're using jQuery you can do something like

if($(element).is(':visible')) {
    // Hello
}
Joey Emery
  • 684
  • 2
  • 6
  • 15
  • The element is visible all the time . It just gets shifted to right when toggled.Thus this might not help .. – Alok Aug 26 '14 at 16:02
  • Check here. http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport solution from @Dan, as recommended. – SSA Aug 26 '14 at 16:04
  • This answer may be useful for you http://stackoverflow.com/questions/8897289/how-to-check-if-element-is-off-screen – RN Kushwaha Aug 26 '14 at 18:36