The table is produced by the following code which correctly produces the table. $result = "<table class=\"tablesorter\" width=\"100%\" border=\"1\" style=\"border-style:solid;border-color:white;\" id=\"settings_table \"><thead><tr><th width=\"5%\">ID</th><th width=\"47%\">Type</ th><th>Value</th><th width=\"18px\"> </th></tr></thead><tbody> "; while($row = mysql_fetch_assoc($query)) { $result .= "<tr><td id=\"settings_row_id_".$row['ID']."\">".$row ['ID']."</td><td id=\"settings_row_type_".$row['ID']."\">" .$row ['type']."</td><td id=\"settings_row_data_".$row['ID']."\">".$row ['data']."</td><td><span class=\"ui-icon ui-icon-circle-plus\" id= \"more_information\" name=\"".$row['ID']."\"></span></td></tr> "; $result.= "<tr style=\"display:none\" id=\"more_info_row_".$row ['ID']."\"><td colspan=\"4\"><b>Description:</b> <span class= \"settings_row_desc_" . $row['ID']." \" style=\"font-style:italic\">" . $row['description']."</span><span class=\"ui-icon ui-icon-closethick\" id=\"settings_delete\" name=\"".$row['ID']."\" style=\"float:right; \"></span><span class=\"ui-icon ui-icon-pencil\" id=\"settings_edit\" name=\"".$row['ID']."\" style=\"float:right;\"></span></td></tr>"; } $result .= "</tbody></table>\n"; $result .= "<div id=\"pager\" class=\"pager\" style=\"top: 637px; position: absolute;\"><form><img src=\"../addons/pager/icons/first.png \" class=\"first\"/><img src=\"../addons/pager/icons/prev.png\" class= \"prev\"/><input type=\"text\" class=\"pagedisplay\"/><img src=\"../ addons/pager/icons/next.png\" class=\"next\"/><img src=\"../addons/ pager/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>";
The ajax code is here $("#load_settings").live('click', function() { $('#settings_main').attr('style', 'border:dashed;text- align:center;font-style:italic;').html('Loading...'); $.ajax({ url: "control.php", data: {command: "settings", action: "load"}, type: "POST", success : function(data) { $("#settings_main").html(data).removeAttr('style'); current_setting_action = "load"; $("#settings_table").tablesorter().tablesorterPager({container : ("#pager")}); //line 15 } }); }); Google chrome gives the following error: Uncaught TypeError: Object #<an Object> has no method 'tablesorterPager' on line 15