No problem! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Kitchen Sent: Wednesday, March 08, 2006 5:39 PM To: rails-spinoffs@lists.rubyonrails.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 value via > > javascript (maybe just pick a very large number to ensure bottom is hit, > > 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 all the > way to the bottom (I figure I won't force a scroll if they aren't at the > 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 ++ [EMAIL PROTECTED] 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. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs