Hello guys,
I have hard time to use tablesorter 2.0 with a javascript div update.
I have tried it in several ways (using default Rails rjs file or all
jquery call) but the result is the same: I get parsers[i] is
undefined.

Here what i would like to achieve: I have a list of states
(California, Florida, Texas ...) and when I click one of them I would
like to display in a div a table with the projects located in that
state. So I fetch the projects in my controller and I update the div
content, after that I call tablesorter initializer.

Below you may find 2 of the solutions I tried

1 - call within the rjs file
page.replace_html :detail, :partial => "list", :locals => { :projects
=> @projects }
page<<"jQuery('.p_table').tablesorter({ sortList: [[0,0]] }); "

2- call within the view (complete)
link_to_remote state, :url => display_projects_path(:state =>
state), :method => :get,
:complete => "jQuery('.p_table').tablesorter({ headers: { 0: { sorter:
false }, 1: {sorter: true }, 2: { sorter: true }, 3: { sorter: true },
4: { sorter: true }, 5: { sorter: true }}});"


Any ideas why I get the parsers error?

THANKS and have a nice day


Sig

Reply via email to