I am a jQuery noob, so please have some mercy.

Basically, I have an AJAX form that utilizes jQuery and other javascript functions (like datepicker, prepend, etc.), and it is in one TR of a table. The rest of the table is data from a MySQL database (which is where the form submits to).

When the form is submitted, the div needs to be refreshed to show the updated data and clear the form. This code is used:

Code:
$(function() {  
  $("#refresh").click(function() {
    $("#mydiv").load(location.href + " #mydiv > *");
  });
});
When the div is refreshed, however, the javascript functions cease to work, which I assume is due to some timing misalignment.

Any help would be appreciated on figuring this out. I can upload more code if you need it. Thanks.