Im not sure if i get what you want to do but
try this:
$div=$('#div');
div.data('old',div.html());

2009/6/5 dhoover <dh.ferm...@gmail.com>

>
> I have a web app where I have created a div to masquerade at a
> textarea so I can add highlighting according to so rules. I rely on
> setting designmode=true. After certain amounts of idle time my code
> grabs the text from the div, which consists of <p> tags and <span>
> tags and re-generates the html with new spans. The paragraphs and text
> stay the same. So far so good. But when the div "repaints" the
> insertion is set to the beginning of the div. I want it to visually
> stay put, meaning I need to somehow record where it was before and
> then restore it afterwards.
>
> Problem is, I can't seem to get my head wrapped around how selections
> (Ranges, etc.) work. I've been googling around for the last day or so
> and have not yet seen the light.
>
> Any ideas?
>



-- 
Gustavo Salome Silva

Reply via email to