Triggering an event with 'click'

Triggering an event with 'click'

Hi,
Im trying to get a function to fire after a button click in the header but it doesnt seem to be working.

any ideas what im doing wrong?

  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5.         <title>INSITE touch</title>
  6.         <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
  7.         <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.css" />
  8.         <link rel="stylesheet" href="assets/css/main.css" />
  9.         <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
  10.         <script src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.js"></script>
  11.        
  12.         <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  13.         <meta name="apple-mobile-web-app-capable" content="yes">
  14.         <link href="assets/images/apple-touch-icon-57x57.png" sizes="57x57" rel="apple-touch-icon">
  15.         <link href="assets/images/apple-touch-icon-72x72.png" sizes="72x72" rel="apple-touch-icon">
  16.         <link href="assets/images/apple-touch-icon-114x114.png" sizes="114x114" rel="apple-touch-icon">
  17.         <link href="assets/images/apple-touch-icon-144x144.png" sizes="144x144" rel="apple-touch-icon">
  18.         <link href="assets/images/apple-touch-startup-image-320x460.png" media="(device-width: 320px)" rel="apple-touch-startup-image">
  19.         <link href="assets/images/apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
  20.         <link href="assets/images/apple-touch-startup-image-768x1004.png" media="(device-width: 768px) and (orientation: portrait)" rel="apple-touch-startup-image">
  21.         <link href="assets/images/apple-touch-startup-image-748x1024.png" media="(device-width: 768px) and (orientation: landscape)" rel="apple-touch-startup-image">
  22.         <link href="assets/images/apple-touch-startup-image-1536x2008.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) and (-webkit-min-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />`
  23.         <link href="assets/images/apple-touch-startup-image-1496x2048.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) and (-webkit-min-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
  24.     </head>
  25.     <body>
  26.     <script>
  27.     $("#mybutton").click(function () {
  28.         alert('button pressed!');
  29.     });
  30.     </script>
  31.         <div data-role="page" id="main">
  32.             <div data-role="header" data-position="fixed">
  33.                 <h1>INSITE touch</h1>
  34.                 <a href="#" data-icon="plus" id="mybutton" class="ui-btn-right">New Job</a>
  35.             </div>
  36.             <div data-role="content">
  37.            
  38.             </div>
  39.         </div>
  40. </body>
  41. </html>