ASP.NET page with update panel, fade a div

ASP.NET page with update panel, fade a div

For the life of me I can't get this to work.
I have a form with a textbox, which has autopostback.
When the postback occurs I want the div to fade. (eventually I want it to fade in, pause and then fade out, but for now lets just get the fade out working)

My script (put in document.ready so it will work with partial postback):

  1. $(document).ready(function () {
  2.             function FadeMessage() {
  3.                 $('#MessageContainer').fadeOut("slow"); };
  4.             });

The div:

  1. <div class="message" id="MessageContainer">
  2.                     <asp:Label ID="MessageLbl" runat="server"></asp:Label>
  3.                 </div>

The codebehind which fires on the text_changed event of the asp.net textbox (SM1 is my scriptmanager on the page):

  1. ScriptManager.RegisterStartupScript(SM1, SM1.GetType(), "fade", "<script type='text/javascript'>FadeMessage()</script>", true);

Any idea what I've done wrong?