Open DataTable

Simple Example

Required files
jquery-2.2.4.js
simple_php_datasource.php
style.css
OpenDataTable.js
country_city.sql

Code
some time we required to distroy the data to load new data for that perpose call this function where you want to laod a new data. $(".OpenDataTable").ODTDestroy();
    
 <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:"simple_php_datasource.php",
      });
    });
     </script>
   </head>
   <body>
    <a href="#" class="link">click here to destroy table</a>
     <table class="OpenDataTable">
	       <thead>
		       <tr>
			        <th>Code</th>
			        <th>Name</th>
			        <th>Continent</th>
		        </tr>
	       </thead>
       <tbody></tbody>
     </table>
     <script type="text/javascript">
			$('.link').click(function(){
				$(".OpenDataTable").ODTDestroy();
				$(".OpenDataTable").OpenDataTable({
					url:"../source/simple_php_datasource.php",
				})
			});
	 </script>
   </body>
 </html>


    

Output

click here to destroy table
Code Name Continent