title: Booststrap datatable not working on web hosting
body: <p>I am using datatable bootstrap on my localhost (it's working fine so far) but when I upload on web hosting provider the datatable doesn't work.</p>
  
  <p>Do you know of any issues like my problem? I was tried to change position of included jquery and javascript, but it still not working.</p>
  
  <p>EDIT:
  This is my code in head</p>
  
  <pre><code>&lt;head&gt;
  
  &lt;meta charset="utf-8"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;meta name="description" content=""&gt;
  &lt;meta name="author" content=""&gt;
  
  &lt;title&gt;BDR Scosys 3.1&lt;/title&gt;
  &lt;link rel="icon" type="image/png" href="../icon.png"/&gt;
  
  &lt;!-- Bootstrap Core CSS --&gt;
  &lt;link href="../bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"&gt;
  &lt;!--
  &lt;link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'&gt;
  &lt;link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'&gt;
  &lt;link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'&gt;
  --&gt;
  &lt;!-- &lt;link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600' rel='stylesheet' type='text/css'&gt; --&gt;
  
  
  &lt;!-- MetisMenu CSS --&gt;
  &lt;link href="../bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet"&gt;
  
  &lt;!-- Bootstrap Toggle Switch--&gt;
  &lt;link href="../bower_components/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet"&gt;
  
  &lt;!-- Timeline CSS --&gt;
  &lt;link href="../dist/css/timeline.css" rel="stylesheet"&gt;
  
  &lt;!-- Custom CSS --&gt;
  &lt;link href="../dist/css/sb-admin-2.css" rel="stylesheet"&gt;
  &lt;link href="../bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css" rel="stylesheet"&gt;
  &lt;!-- Step --&gt;
  &lt;link href="../dist/css/steps.css" rel="stylesheet"&gt;
  
  &lt;!-- Reset Password --&gt;
  &lt;link href="../dist/css/reset_password.css" rel="stylesheet"&gt;
  
  &lt;script src="../dist/js/jquery-1.7.min.js"&gt;&lt;/script&gt;
  &lt;script src="../dist/js/pass-js.js"&gt;&lt;/script&gt;
  
  &lt;!-- Morris Charts CSS --&gt;
  &lt;link href="../bower_components/morrisjs/morris.css" rel="stylesheet"&gt;
  
  &lt;!-- Custom Fonts --&gt;
  &lt;link href="../bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"&gt;
  
  &lt;!-- HighChart --&gt;
  &lt;script src="../bower_components/highchart/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="../bower_components/highchart/highcharts.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;?php
  if ($_GET['mod']=='dashboard' OR $_GET['mod']=='st_all_branch' OR $_GET['mod']=='stat_ao'){
      include "../config/grafik/all_branch.php";
      // include "../config/grafik/all_branch_tp.php";
  }
  elseif ($_GET['mod']=='st_all_scorer'){
      include "../config/grafik/all_scorer.php";
  }
  ?&gt;
  
  &lt;?php
  if ($_GET['mod']=='credit_scoring' OR $_GET['mod']=='pengguna' OR $_GET['mod']=='rec_app' OR $_GET['mod']=='ak' OR $_GET['mod']=='spfk' OR $_GET['mod']=='mp' OR $_GET['mod']=='tater' OR $_GET['mod']=='pk' OR $_GET['mod']=='skpg' OR $_GET['mod']=='promess' OR $_GET['act']=='history' OR $_GET['act']=='broadcast'){ ?&gt;
  &lt;!-- DataTables CSS --&gt;
  &lt;link href="../bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet"&gt;
  
  &lt;!-- DataTables Responsive CSS --&gt;
  &lt;link href="../bower_components/datatables-responsive/css/dataTables.responsive.css" rel="stylesheet"&gt;
  
  
  &lt;?php } ?&gt;
  
  &lt;!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --&gt;
  &lt;!-- WARNING: Respond.js doesn't work if you view the page via file:// --&gt;
  &lt;!--[if lt IE 9]&gt;
      &lt;script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"&gt;&lt;/script&gt;
      &lt;script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"&gt;&lt;/script&gt;
  &lt;![endif]--&gt;
  &lt;?php include "../config/limitWord.php"; ?&gt;
  
  &lt;script language="javascript" src="../bower_components/calendar/calendar.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p>And this is my code in footer</p>
  
  <pre><code>&lt;script src="../bower_components/jquery/dist/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Bootstrap Core JavaScript --&gt;
  &lt;script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Metis Menu Plugin JavaScript --&gt;
  &lt;script src="../bower_components/metisMenu/dist/metisMenu.min.js"&gt;&lt;/script&gt;
  
  &lt;script src="../bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Morris Charts JavaScript --&gt;
  &lt;script src="../bower_components/raphael/raphael-min.js"&gt;&lt;/script&gt;
  &lt;script src="../bower_components/morrisjs/morris.min.js"&gt;&lt;/script&gt;
  &lt;?php
  if ($_GET['mod']=='st_gro_scorer'){
      include "../config/grafik/growth_branch.php";
  }
  elseif ($_GET['mod']=='stat_ao'){
      include "../config/grafik/growth_scorer_ao.php"; ?&gt;
  &lt;?php } ?&gt;
  &lt;!--
  &lt;script src="../js/morris-data.js"&gt;&lt;/script&gt;
  --&gt;
  
  &lt;!-- Custom Theme JavaScript --&gt;
  &lt;script src="../dist/js/sb-admin-2.js"&gt;&lt;/script&gt;
  &lt;script src="../dist/js/enscroll-0.6.2.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Bootstrap Toggle Switch --&gt;
  &lt;script src="../bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
  $(document).ready(function(){
      $('[data-toggle="tooltip"]').tooltip();
  });
  &lt;/script&gt;
  
  &lt;?php
  if ($_GET['mod']=='credit_scoring' OR $_GET['mod']=='pengguna' OR $_GET['mod']=='rec_app' OR $_GET['mod']=='ak' OR $_GET['mod']=='spfk' OR $_GET['mod']=='mp' OR $_GET['mod']=='tater' OR $_GET['mod']=='pk' OR $_GET['mod']=='skpg' OR $_GET['mod']=='promess' OR $_GET['act']=='history' OR $_GET['act']=='broadcast'){ ?&gt;
  &lt;!-- DataTables JavaScript --&gt;
  &lt;script src="../bower_components/DataTables/media/js/jquery.dataTables.min.js"&gt;&lt;/script&gt;
  &lt;script src="../bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function() {
      $('#dataTables-example').DataTable({
              responsive: true
      });
  });
  &lt;/script&gt;
  &lt;?php } ?&gt;
  &lt;script&gt;
      function formatCurrency(num) {
      num = num.toString().replace(/\$|\,/g,'');
      if(isNaN(num))
      num = "0";
      sign = (num == (num = Math.abs(num)));
      num = Math.floor(num*100+0.50000000001);
      cents = num%100;
      num = Math.floor(num/100).toString();
      if(cents&lt;10)
      cents = "0" + cents;
      for (var i = 0; i &lt; Math.floor((num.length-(1+i))/3); i++)
      num = num.substring(0,num.length-(4*i+3))+'.'+
      num.substring(num.length-(4*i+3));
      return (((sign)?'':'-') + 'Rp ' + num + ',' + cents);
      }
  &lt;/script&gt;
  &lt;!-- Row Button --&gt;
  &lt;script&gt;
      $(document).ready(function(){
      $('tbody #tr-link').click(function(){
          window.location = $(this).data('href');
          return false;
      });
  });
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function () {
      window.setTimeout(function() {
          $(".auto-hide").fadeTo(100, 0).slideUp(500, function(){
              $(this).remove();
          });
      }, 5000);
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is my table script</p>
  
  <pre><code>  &lt;div class="row" id="scrollbox3"&gt;
      &lt;div class="col-lg-12"&gt;
      &lt;h3&gt;&lt;/h3&gt;
          &lt;ol class="breadcrumb"&gt;
              &lt;li class="active"&gt;Credit Scoring&lt;/li&gt;
          &lt;/ol&gt;
  
      &lt;/div&gt;
      &lt;!-- /.col-lg-12 --&gt;
  &lt;/div&gt;
  &lt;!-- /.row --&gt;
  &lt;?php
  include "../config/functions/notifications.php";
  ?&gt;
  &lt;?php
  $tgl_dibuat = date('Y-m-d');
  
  if ($_SESSION['id_jabatan']=='AOF' OR $_SESSION['id_jabatan']=='SOF' OR $_SESSION['id_jabatan']=='BSU'){
      $tampil=mysql_query("SELECT * FROM credit_scoring,pengguna WHERE credit_scoring.kode_karyawan=pengguna.kode_karyawan AND credit_scoring.kode_karyawan='$_SESSION[kode_karyawan]' ORDER BY credit_scoring.tgl_dibuat DESC");
      $row = mysql_num_rows($tampil);
  }
  elseif ($_SESSION['id_jabatan']=='PCA' OR $_SESSION['id_jabatan']=='TLE'){
      $tampil=mysql_query("SELECT * FROM credit_scoring,pengguna WHERE credit_scoring.kode_karyawan = pengguna.kode_karyawan AND credit_scoring.kode_cabang='$_SESSION[kode_cabang]' ORDER BY credit_scoring.tgl_dibuat DESC");
      $row = mysql_num_rows($tampil);
  }
  else{
      $tampil=mysql_query("SELECT * FROM credit_scoring, pengguna WHERE credit_scoring.kode_karyawan = pengguna.kode_karyawan ORDER BY credit_scoring.tgl_dibuat DESC");
      $row = mysql_num_rows($tampil);
  } ?&gt;
      &lt;div class="row datatables-content"&gt;
          &lt;div class="col-lg-12"&gt;
                      &lt;div class="dataTable_wrapper"&gt;
                          &lt;table class="table table-striped table-hover" id="dataTables-example"&gt;
                              &lt;thead&gt;
                                  &lt;tr&gt;
                                      &lt;th&gt;&lt;/th&gt;
                                      &lt;th&gt;Nama Debitur&lt;/th&gt;
                                      &lt;th class="hidden-xs hidden-sm"&gt;Fasilitas Kredit&lt;/th&gt;
                                      &lt;th class="hidden-xs hidden-sm"&gt;Pembuat&lt;/th&gt;
                                      &lt;th&gt;Status&lt;/th&gt;
                                      &lt;th class="hidden-xs hidden-sm"&gt;Tgl App&lt;/th&gt;
                                  &lt;/tr&gt;
                              &lt;/thead&gt;
                              &lt;tbody&gt;
                                  &lt;?php while ($r=mysql_fetch_array($tampil)){ ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;
                                          &lt;ul class="nav nav-pills nav-stacked"&gt;
                                              &lt;li class="dropdown"&gt;&lt;button type="button" class="btn btn-primary btn-xs" data-toggle="dropdown"&gt;&lt;i class="fa fa-list"&gt;&lt;/i&gt;&lt;/button&gt;
                                                  &lt;?php include 'credit_scoring/option_menu.php';?&gt;
                                              &lt;/li&gt;
                                          &lt;/ul&gt;
                                      &lt;/td&gt;
                                      &lt;td&gt;&lt;?php echo ucwords($r['nama_debitur']);?&gt;&lt;/td&gt;
                                      &lt;td class="hidden-xs hidden-sm"&gt;&lt;?php echo" $r[fasilitas_kredit] ";?&gt;&lt;/td&gt;
                                      &lt;td class="hidden-xs hidden-sm"&gt;&lt;?php echo" $r[nama_pengguna] ";?&gt;&lt;/td&gt;
                                      &lt;td&gt;&lt;?php if ($r['status']=='Level 1'){
                                              echo "Tertunda";
                                              }
                                              elseif ($r['status']=='Level 2'){
                                                  echo"Scored";
                                              }
                                              elseif ($r['status']=='Level 3'){
                                                  echo"Data Kredit";
                                              }
                                              elseif ($r['status']&gt;0){
                                                  $qPangkat = mysql_query("SELECT * FROM pengguna,jabatan WHERE pengguna.id_jabatan=jabatan.id_jabatan AND id_pangkat_komite='$r[status]'");
                                                  $pk = mysql_fetch_array($qPangkat);
                                                  echo $pk['nm_jabatan'];
                                              }
                                              else{
                                                  echo $r['status'];
                                              }
  
                                              ?&gt;
                                      &lt;/td&gt;
                                      &lt;td class="hidden-xs hidden-sm"&gt;&lt;?php   if ($r['tgl_final_approve']&gt;0){ echo date('d-m-Y',strtotime($r['tgl_final_approve'])); }
                                                  else { echo "-"; }
                                      ?&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                                  &lt;?php } ?&gt;
                              &lt;/tbody&gt;
                          &lt;/table&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>This how it looks like before/after hosted.</p>
  
  <p><a href="http://i.stack.imgur.com/DQ8UG.jpg" rel="nofollow">after hosted</a> - 
  <a href="http://i.stack.imgur.com/TkdcW.jpg" rel="nofollow">before hosted</a></p>