Forum: Ruby on Rails Ajax: sortable_element with table-rows

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
bpaland (Guest)
on 2005-11-28 19:27
(Received via mailing list)

I wanted to sort my rows via ajax and sortable_element, but that
doesn't work. But it works with ul/li, so required js-libs are there.

Here is what i did (simplified):

<table id="tableorder">
<% for page in @pages %>
  <tr id="item_<%= %>">
    <td><%= page.title %></td>
    <td><%= image_tag("arrow", :alt => 'sort', :title => "sort",
:class=>"sort") %></td>
<% end %>

<p id="order-info"></p>

<%= sortable_element 'tableorder',
      :update => 'order-info',
      :complete => visual_effect(:highlight, 'tableorder'),
      :url => { :action => "order" } %>

Does anyone have a clue? I wanted to keep the table, because there are
a few more infos to be diplayed.

cuong.tran (Guest)
on 2005-11-28 21:45
(Received via mailing list)
Check out:

There's apparently some limitations with the "table" tag.
This topic is locked and can not be replied to.