Ryan Gahl
2006-Mar-09 03:15 UTC
RE: question about auto-updating divwithoverflow:auto and maintaining position
No problem! -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeremy Kitchen Sent: Wednesday, March 08, 2006 5:39 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] question about auto-updating divwithoverflow:auto and maintaining position On Wednesday 08 March 2006 12:27, Jeremy Kitchen wrote:> On Wednesday 08 March 2006 12:24, Ryan Gahl wrote: > > You should be able to do this by changing the div''s .scrollTop valuevia> > javascript (maybe just pick a very large number to ensure bottom ishit,> > like 10,000).what I ended up doing is this: <div id="wrap" style="overflow:auto"> <div id="inner"></div> </div> then in my javascript I did: $(''wrap'').scrollTop = $(''inner'').offsetHeight;> good call :) Now to figure out if the user is actually scrolled allthe> way to the bottom (I figure I won''t force a scroll if they aren''t atthe> bottom, signalling to me that they''ve scrolled themselves :)I went the lazy route and added a checkbox ;) Thanks again for the help! -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob. The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Apparently Analagous Threads
- RE: question about auto-updating div withoverflow:auto and maintaining position
- question about auto-updating div with overflow:auto and maintaining position
- Draggable with auto-scroll
- RE: extending the Element.prototype to provideasetAttributes function
- Javascript & Scrolling