I have two different HTML files, two different UIWebViews & a UISegmentControl. On segmentChanged, I had displayed the WebView by loading a HTML file. 
Both HTML files contains common sections only the section content is changed. Now I want to implement the functionality that, when user reads section 1.1 of first WebView & clicks Segment for loading second WebView, then the second WebView needs to scroll upto the section 1.1 which he reads in first WebView and viceversa. Also there are n number of sections.
I used following javacript but it needs the parameter of current div id. But on scroll, how can I get the current visible div id. I had given the id for each div.
function pointInView(id)
{
    var divid = document.getElementById(id);
    divid.scrollIntoView(true);
    return false;
}
Anyone please help me.
 
     
     
     
     
    