I have two different HTML files, two different UIWebViewsand UISegmentControl. On segmentChangedI displayed WebViewby uploading an HTML file. Both HTML files contain common sections, only the contents of the section are changed. Now I want to implement a functionality that, when a user reads the section 1.1first WebViewand clicks Segmentto download the second WebView, then the second WebViewmust scrollbefore section 1.1, which he reads in the first WebViewand vice versa. There are also n rooms. I used the following javacript, but it needs the current parameter div id. But on scroll, how can I get the current visible div id. I gave idfor everyone div.
function pointInView(id)
{
var divid = document.getElementById(id);
divid.scrollIntoView(true);
return false;
}
Someone please help me.
source
share