pageshow event not working

pageshow event not working

I can't seem to get the pageshow event to work. The html below is the page that I am navigating to with the pageshow event wired up. However when the page opens the alert is not invoked. I'm sure I've done something wrong but I can't work out what?

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head runat="server">
  4.     <title></title>

  5.     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
  6.     <script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
  7.     <script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>

  8. </head>
  9. <body>
  10.     <div id="mypage" data-role="page"  data-theme="b"> 
  11.    <div data-role="header">
  12.             <h1>Page 2</h1>
  13.         </div> 
  14.    <div data-role="content">
  15.             <p>This is page 2.</p>
  16.         </div> 
  17.     </div> 

  18.     <script type="text/javascript" language="javascript">
  19.         $('mypage').live('pageshow', function (event, ui) {
  20.             alert('This page was just hidden: ' + ui.prevPage);
  21.         });
  22.     </script>
  23. </body>
  24. </html>