Klaus, do you know which browsers scrollIntoView works with?
On 6/23/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
Phil Glatz wrote: > I have a table inside a div; the div has a fixed height and overflow set > to scroll. When the page is opened, the row containing the last selected > data is highlighted, via jquery/DOM. > > the problem I have is that if the list (number of rows in the table) is > bigger than can fit in the div, and the current element is below the > visible area, you have to scroll down to see it. > > Is there a way to make the div scroll up to make the row I want to see > visible, using DOM? > > I don't think so, but thought I'd ask. Do any of the add-ons for jquery > that deal with tables handle this? > Try the scrollIntoView method: $('tr')[0].scrollIntoView(); http://developer.mozilla.org/en/docs/DOM:element.scrollIntoView --Klaus
-- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ