actually, there is one problem. I guess what I need is something a
little different.
Basically the same, but I need to know if the row is at the end or
beginning of the list. If a row is moving into the first spot, I need to
remove the "Move Up" link. Same with the row moving down (removing "Move
Down" link if last row).
Is there a way to check for this?
Thanks
John Bill wrote:
good job!
2009/6/15 Paul Witschger <tigerseyet...@gmail.com
<mailto:tigerseyet...@gmail.com>>
Thank you, Karl!!
Works excellent. Exactly what I needed!
Karl Swedberg wrote:
Assuming that the Move Up link is within the table row and that
the link has a class of "moveup," you could do something like this:
$('a.moveup').click(function() {
var $thisRow = $(this).parents('tr:first');
$thisRow.insertBefore( $thisRow.prev() );
return false;
});
--Karl
____________
Karl Swedberg
www.englishrules.com <http://www.englishrules.com/>
www.learningjquery.com <http://www.learningjquery.com/>
On Jun 14, 2009, at 6:36 PM, theprodigy wrote:
I am creating an admin section for a site I'm building. One of the
options is to change the sort order of a list of items. I have
all the
backend (PHP) code running properly, but having a little issue with
the jQuery.
When the user clicks the Move Up link, how can I switch the
table row
containing the link they clicked on, and the one above it (row 3
becomes 2, and row 2 becomes 3)?
Thanks