I need to be able to automatically scroll a div all the way to the right when new content is added to it via ajax. I've tried direction: rtl; which works in FF and IE but not Safari.. so i'm trying this:
Any suggestions?
The user's mouse will be over the div when new content is added via onclick so i'm using onmouseover to trigger it since onload doesn't work with divs.
Thanks for your help!
Code:
<script type="text/javascript">
function scrollDiv()
{
document.getElementById('id').scrollTo(1000,0)
}
</script>
<div onmouseover="scrollDiv()"></div>
The user's mouse will be over the div when new content is added via onclick so i'm using onmouseover to trigger it since onload doesn't work with divs.
Thanks for your help!
Comment