I downloaded Tablesorter and it works fine but if I use in codeigniter firebug says c is undefined
on select different value from dropdown.
I move all js resource files inclusion in views/template/header/
header.php
<!-- Tablesorter -->
<?php echo link_tag('tablesorter/themes/blue/style.css');?>
<script type="text/javascript" src="<?php echo base_url(); ?>tablesorter/js/jquery.tablesorter.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>tablesorter/js/jquery.tablesorter.pager.js"></script>
<script type="text/javascript">
$(function() {
$("table")
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $("#pager")});
});
</script>
<!--// Tablesorter -->
and the view where I use tablesorter is
views/countries/index.php
index.php
<table cellspacing="1" class="tablesorter">
<thead>
<tr>
<th>Country Name</th>
<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Country Name</th>
<th>Action</th>
</tr>
</tfoot>
<tbody>
<?php foreach ($countries as $key): ?>
<tr>
<td><?php echo $key['countryName'];?></td>
<td><?php echo anchor("countries/edit/".$key['countryId'],"Edit")?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div id="pager" class="pager">
<form>
<img src="<?php echo base_url(); ?>tablesorter/icons/first.png" class="first"/> <img src="<?php echo base_url(); ?>tablesorter/icons/prev.png" class="prev"/>
<input type="text" class="pagedisplay"/>
<img src="<?php echo base_url(); ?>tablesorter/icons/next.png" class="next"/> <img src="<?php echo base_url(); ?>tablesorter/icons/last.png" class="last"/>
<select class="pagesize">
<option selected="selected" value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
</select>
</form>
</div>
now after integrate with CodeIgniter it just work for ascending/descending but pagination does not work and firebug says c is undefined