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?