html vertical auto scroll with javascript -


im new pure javascript (well found easy use jquery, bad cant use jquery in case :d).

i tried follow sample code, not working in web.

this screen shoot , explanation of web :

enter image description here

so, page separated 2 different html file, 1 header , jquery tabs, other 1 content below tab.

my plan let content below jquery tabs scrollable, following code html of content (below jquery tabs):

<body>     <script type="javascript">         function top() {         document.getelementbyid( 'top' ).scrollintoview();         };      function bottom() {         document.getelementbyid( 'bottom' ).scrollintoview();         window.settimeout( function () { top(); }, 2000 );     };      bottom(); </script>  <div id="form_search">     <div id="top">top</div>     <?php echo form_open('backend/index') ?>         <p>         kelas :         <?php echo form_dropdown('ddl_kelas1', $list_kelas, 'id="ddl_kelas1"');?> -         <?php echo form_dropdown('ddl_kelas2', $list_kelas, 'id="ddl_kelas2"');?>         </p>         <p>         nama : <?php echo form_input('txt_nama');?>         alamat : <?php echo form_input('txt_alamat');?>         tanggal lahir : <input type="text" id="datepicker" />         </p>         <?php echo form_submit('btn_search', 'search');?>     <?php echo form_close(); ?> </div> <div>     <?php echo $table ?>     <?php echo $pagination ?>     <div id="bottom">bottom</div> </div> 

please note top , bottom div page limit (i followed sample code above). have tried way change id/element used limit, still not working.

thank :d

note : use codeigniter framework project :d

it seems solution user's question add overflow-y:scroll css div tag content being placed. simple solution


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -