replacement for IE's scrollIntoView() method in Mozilla

K

kai

Hi to all,

I found out the you can use the scrollIntoView() method, to scroll an
element (ie: a <div> with lots of content that it overflows) to its
bottom / last line. But this only happens in IE. Does mozilla have any
methods that do the same? Or is there any hacks algo we can try to
perform this for Mozilla?

ref:http://msdn2.microsoft.com/en-us/li.../group/comp.lang.javascript/browse_thread/thr...

Thanks.

scrollIntoView works in Mozilla and Safari. I believe its part of DOM
level 2, http://developer.mozilla.org/en/docs/DOM:element.scrollIntoView
 
S

scripts.contact

Hi to all,

I found out the you can use the scrollIntoView() method, to scroll an
element (ie: a <div> with lots of content that it overflows) to its
bottom / last line. But this only happens in IE. Does mozilla have any
methods that do the same? Or is there any hacks algo we can try to
perform this for Mozilla?

you can use it in Mozilla (and opera..) but you have to specify the
parameter:
e.scrollIntoView(1)
 
D

David Mark

you can use it in Mozilla (and opera..) but you have to specify the
parameter:
e.scrollIntoView(1)

The parameter is optional. If true, it aligns the element to the top
of the container. The default is to align with the bottom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top