<script type="text/javascript">
$(function() {
	$("#dataTable.detail tr:even").addClass("stripe1");
	$("#dataTable.detail tr:odd").addClass("stripe2");
	$("#dataTable.detail tr").hover(
		function() {
			$(this).toggleClass("highlight");
		},
		function() {
			$(this).toggleClass("highlight");
		}
	);
});
function pilih(id){
	$("#dlg2").dialog('close');
	$("#kode_customer").val(id);
	$("#kode_customer").focus();
	
}
</script>
<table id="dataTable" class="detail" width="100%">
<tr>
	<th>No</th>
    <th>Kode Customer</th>
    <th>Nama Customer</th>
    <th>Jk</th>
    <th>Telp</th>
    <th>Alamat</th>
    <th>Ambil</th>
</tr>
<?php
	if($data->num_rows()>0){
		$no =1;
		foreach($data->result_array() as $db){  
		?>    
    	<tr>
			<td align="center" width="20"><?php echo $no; ?></td>
            <td align="center" width="100" ><?php echo $db['kode_customer']; ?></td>
            <td ><?php echo $db['nama_customer']; ?></td>
            <td align="center" width="80" ><?php echo $db['jk']; ?></td>
            <td align="left" width="100" ><?php echo $db['telp']; ?></td>
            <td align="right" width="100" ><?php echo $db['alamat']; ?></td>
            <td align="center" width="80">
            <a href="javascript:pilih('<?php echo $db['kode_customer'];?>')" >
        	<img src="<?php echo base_url();?>asset/images/add.png" title='Ambil'>
        	</a>
            </td>
    </tr>
    <?php
		$no++;
		}
	}else{
	?>
    	<tr>
        	<td colspan="7" align="center" >Tidak Ada Data</td>
        </tr>
    <?php	
	}
?>
</table>