javascript - Automatically scroll down browser window when div grows -


this question has answer here:

so have div footer on page lets has height of 200 pixels. div has button reveals html objects within div , therefore increases height of div, lets say, 400px.

so div 200px 400px , aligned bottom of page. problem when div expanded browser doesnt automatically scroll down window in order show div. result, see top 200 pixels of div ( original size ) , have manually scroll down browser window in order see complete div.

is there way using html css can make browser automatically scroll down when div expands? if not, guess possible javascript @ least..

i don't know solution html , css, try javascript solution:

div = document.getelementbyid('#your_div'); div.scrollto(0,div.scrollheight); 

take at: scroll automatically bottom of page.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -