Open DataTable

Codeigniter Example

Required files
jquery-2.2.4.js
Click to view CI example
country_city.sql

Code (view/opendata_table.php)
for controller click above link and see the exmaple.
    
 <html>
   <head>
     <title>Open Data Table</title>
     <script src="https://code.jquery.com/jquery-2.2.4.js"></script>
     <link rel="stylesheet" type="text/css" href="style.css">
     <script src="OpenDataTable.js"></script>
     <script type="text/javascript">
    $(document).ready(function(){
      $(".OpenDataTable").OpenDataTable({  
        url: "<?php echo base_url() ?>index.php/opendatatable/simple_datasource",
      });
    });
     </script>
   </head>
   <body>
     <table class="OpenDataTable">
	       <thead>
		       <tr>
			        <th>Code</th>
			        <th>Name</th>
			        <th>Continent</th>
		        </tr>
	       </thead>
       <tbody></tbody>
     </table>
   </body>
 </html>


    

Output

Code Name Continent