i want to highlight the selection.I have gone through this solution suggested by Tim Down , which does the half job for me.
http://stackoverflow.com/questions/2582831/highlight-the-text-of-the-dom-range-element
I have web pages stored at local,now i need a way to highlight the text permanently.By permanently,i mean i highlighted some text ,closed the browser then re-opens the page from local the text should remain highlighted.Tim's solution keeps the text highlighted as long as i don't refresh or close the page.I guess i need to save the range's start and end offset somewhere(local) so that next time i re-open the page i highlight all the ranges again.help me to figure out re-highlighting
Edit:Sorry, forgot to mention that i am working on iPhone so i can keep an array of selections on local for a specific page.Any solution to store range for selection which can be nested or multiple div,p,span.