New with dataTables
New with dataTables
Randyjp
Posts: 1Questions: 0Answers: 0
I'm new at data and I dont seem to get it to work. I'm Using PHP with codeignaiter and Jquery UI.
here's my table
[code]
Suceso
Habitación
Fecha
Hora
<?php
$j=0;
foreach ($resuelto as $done){
if($j == 0){
$clas="odd";
}else{
$clas="even";
}
$j = 1 - $j;
?>
<?php echo $done['suceso'] ?>
<?php echo $done['habitacion']?>
<?php echo $done['fecha']?>
<?php echo $done['hora']; ?>
<?PHP }?>
[/code]
You can see It has some php code within it, but I think is valid. Then I'm trying to call it in my script part but I doesn't work.
[code]
$(document).ready( function () {
$("#table_id").dataTable();
} );
[/code]
Any Idea What I'm doing wrong??
here's my table
[code]
Suceso
Habitación
Fecha
Hora
<?php
$j=0;
foreach ($resuelto as $done){
if($j == 0){
$clas="odd";
}else{
$clas="even";
}
$j = 1 - $j;
?>
<?php echo $done['suceso'] ?>
<?php echo $done['habitacion']?>
<?php echo $done['fecha']?>
<?php echo $done['hora']; ?>
<?PHP }?>
[/code]
You can see It has some php code within it, but I think is valid. Then I'm trying to call it in my script part but I doesn't work.
[code]
$(document).ready( function () {
$("#table_id").dataTable();
} );
[/code]
Any Idea What I'm doing wrong??
This discussion has been closed.
Replies