Open DataTable

Callback Function Example

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

Code

simply add below line inside OpenDataTable
			
				callback: function() {
        				// our code here
        				$(".edit").click(function(){
        				alert("Okk....");
						return false;
						});
        			}
			
			
add below line in callback_php_datasource.php, you will find below line at bottom of script.
			
			
				 // action buttons
				$dataRaw[3]='<a href="#" class="edit">Edit</a>';
			
			
    
 <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:"callback_php_datasource.php",
        callback: function() {
        				// our code here
        				$(".edit").click(function(){
        				alert("Okk....");
						return false;
						});
        			}
      });
    });
     </script>
   </head>
   <body>
     <table class="OpenDataTable">
	       <thead>
		       <tr>
			        <th>Code</th>
			        <th data-colsearch="yes" >Name</th>
			        <th>Continent</th>
			        <th>Action</th>
		        </tr>
	       </thead>
       <tbody></tbody>
     </table>
   </body>
 </html>


    

Output

Code Name Continent Action