This code seems to work great in FF and Safari, but IE seems to interact
with it differently.
[code]
$('a.moveup').click(function(event) {
var href = $(this).attr('href');
$.get(href);
var $thisRow = $(this).parents('tr:first');
var $thisTable = $('#main_table');
var $rows = $('#main_table tr');
$thisRow.next().insertBefore($thisRow.prev().prev());
$thisRow.insertBefore( $thisRow.prev().prev().prev());
$rows.find('.moveup, .movedown').show();
$thisTable.find("tr:nth-child(2)").find(".moveup").hide();
$thisTable.find("tr:last").prev().find(".movedown").hide();
return false;
});
[/code]
In Firefox and Safari, it does what it's supposed to do, but for some
reason, in IE it seems to stretch the div container about 5 times as
tall as it's supposed to be, bottom align the inner div, and then
switch. Once that happens, you can switch the lines around just fine. It
doesn't stretch the div container again, just leaves it as is (5 times
as tall).
What is wrong with this code? It's really starting to irritate me.
If you need to see it in action, let me know (and possibly an IM way or
email way to contact you, and I will send you the URL and instructions.
Thanks,
Paul