Ciao a tutti ho questa pagina a cui vorrei associare la funzione all'apertura della pagina di scorrere verso un elemento specifico.
il csscodice HTML:<div id="top"> </div> <div id="shell"> <div id="container">TEXT</div> </div>
mentre lo script a piede del file ècodice:#container { width: 900px; margin: 0px auto; } #shell { width: 100%; background-color: #f9f9f9; min-height: 100%; } /* IE6 hack */ * html #shell { height: 100%; } #top { min-height: 100%; } /* IE6 hack */ * html #top { height: 100%; }
codice:$( document ).ready(function() { $('html, body').animate({ scrollTop: ($('#shell').top) },500); });

Rispondi quotando