<style type="text/css">

  .hide-scrollbar::-webkit-scrollbar {
    display: none;
  }

  .data-list {
    height: 400px;
    width: 100%;
    overflow-y: hidden;
  }
  .data-list,ul,li{
    list-style-type: none;
  }

</style>
<div class="card card-border-primary">
  <a href="#" onclick="load()"><i class="icofont-refresh"></i></a>
  <div class="container">
    <ul>
      <li>
        <table class="table">
          <tr>
            <td width="50">No</td>
            <td width="100">No. Ujian</td>
            <td width="200">Nama</td>
            <td width="100">Asal Ujian</td>
            <?php
            $exp=explode(",", $bidang_soal);
            // array_multisort($exp, SORT_ASC);
            for ($i=0; $i < count($exp); $i++) { 
              echo '<td width="50">'.$exp[$i].'</td>';
            }
            ?>
            <td width="100">KET</td>
          </tr>
        </table>
      </li>
    </ul>
    <ul class="data-list" data-autoscroll>
      <li>
        <table class="table table-striped">
          <?php
          $no=0;
          foreach ($live->result() as $data) { 
            $no++;
            $expnilai=explode(",", $data->nilai);
            echo '
            <tr>
              <td width="50">'.$no.'</td>
              <td width="100">'.$data->no_ujian.'</td>
              <td width="200">'.$data->nama.'</td>
              <td width="100">'.$data->asal_ujian.'</td>';
              for ($i=0; $i < count($exp); $i++) { 

                $nilai_per_bidang=$this->m_cat->m_nilai($data->pin,$data->no_ujian,$exp[$i])->result();

                echo '<td width="50">'.@$nilai_per_bidang[0]->nilai.'</td>';

              }
              echo '
              <td width="100">'.$data->ket.'</td>
            </tr>';
          }
          ?>
        </table>
      </li>
    </ul>
  </div>
</div>
<script type="text/javascript">
  $(document).ready(function(){
      setTimeout(function(){
      $("[data-autoscroll]").autoscroll({
          interval: 20
        });
      },2000)

      $("#nama_ujian").html('<?php echo $nama_ujian?>');
    })
</script>