$(document).ready() not really ready ?

$(document).ready() not really ready ?


Hello,
I have a really strange problem using jQuery:
I have a page that contains a form. This form contains a table with
lots of radio button which is visible in CSS and a list wich is
"display: none" in CSS. The idea is that the list will be set visible
and sortable and used as a replacement for the radio button (wich are
hidden using javascript and only there for gracefull degradation).
I created the jQuery script locally, everything was normal. but when I
tried with the page and the script on a remote server, the script
executes normally at the first page load, but on page refresh (using
Firefox3), The "show" function does not work. If I had an "alert"
before this "show function, it works.
Javascript code:
----------------------------------
function hideNonJsElements(){
$("#tablePilotPosition").hide();
$("input.startover").hide();
}
function showJsElements(){
//alert("test");
$("#javascriptPrognosticForm").show();
$("#javascriptPrognosticForm").sortable({
items: "li",
opacity: 80,
axis: "y"
});
}
$(document).ready(function() {
//Hide non JS elements
hideNonJsElements();
//Show JS form and make it sortable
showJsElements();
//Serialize and AJAX post on submit
$("form#formPilotPosition").submit(function(){
//Define options
var serializeOptions = new Array();
serializeOptions['attribute'] = "id";
serializeOptions['expression'] = "(.+)";
serializeOptions['key'] = "prognosticOrder";
//Serialize !
var postString = $("#javascriptPrognosticForm").sortable( "serialize",
serializeOptions);
//Post using AJAX (TODO)
alert (postString);
//Do not perform standard post
return false;
});
});
----------------------------------
The page can be seen on http://quentin.dugauthier.net/f1/test.php
The problem does not appear in IE6.
Thanks in advance for any hint you can give me.
KR,
Quentin.