0

I have a project made with Framework7. All content is programmed in one html file. The project contains several pages.

My goal is to update some spans ([id^='Update']) every second whenever they are visible but not when they are not visible on the screen. This will save traffic.

The problem I had with plugins like jQuery.inview or jQuery.appear is that they trigger on the first view but after this they always "see" the element even when I'm virtually on another page and the element is not visible to me.

Edited

If I run $.force_appear(); every second it updates the status - shouldn't this be done "always"?

However the new page just covers the first page - therefore the elements are not disappeared for the plugin even though I don't see them.

I hope this makes it clearer. Putting a demo online is too complex because I have to add the full framework.

Do you have any idea what I could do?

jrbedard
  • 3,336
  • 5
  • 26
  • 34
davinci
  • 65
  • 1
  • 9
  • what have you tried till now. It would be good if you can create a demo of what you have and whats the issue. – Manish Nov 20 '16 at 13:51
  • It is difficult to put a demo up here but I found out more about what exactly happens. Please check the question again. – davinci Nov 20 '16 at 18:47
  • Possible duplicate of [Check if element is visible after scrolling](http://stackoverflow.com/questions/487073/check-if-element-is-visible-after-scrolling) – Andy Ray Nov 20 '16 at 18:49

0 Answers0