title: Getting .NET linkbuttons to work in iOS web app
body: <p>I have a web site which can be added as an icon to the iPhone/iPad home screen (as all web sites can).
  When tapping the icon the web site shows up in full screen mode (yay).
  To prevent all links on this web site to open up in safari and thereby go away from the full screen mode, I'm overriding the click event of all html anchors.
  This works great, but not on .NET linkbuttons, probably because they need to make a postback.</p>
  
  <p>This is my code:</p>
  
  <pre><code>var iOS = (navigator.userAgent.match(/(iPad|iPhone|iPod)/i) ? true : false);
  if (iOS) {
      $("a").click(function (event) {
          var href = $(this).attr("href");
          if (href.indexOf("doPostBack") == -1 &amp;&amp; href.indexOf("javascript") == -1) {
              event.preventDefault();
              window.location = $(this).attr("href");
          }
      });
  }
  </code></pre>
  
  <p>As you can see I'm trying to prevent this special behavior if the href contains "doPostBack" (which Linkbuttons do), or if they contain "javascript" (this is for links with e.g. onclick='xxx()').
  This doesn't work though. Links created with Linkbutton doesn't respond, and I have no idea why.</p>
  
  <p>Any help at all is much appreciated.
  Thanks</p>