you are in: codestackercodes [RSS] → tag: ios [RSS]

useful html5 attributes for iOS Delicious Email

show/hide lines
   1  <!-- For a username, you don't want to autocorrect, nor do you want a capitalised first letter. -->
   2  <input type="text" autocorrect="off" autocapitalize="off">
   3  
   4  <!-- Turn telephone detection off -->
   5  <meta name="format-detection" content="telephone=no" />
   6  
   7  <!-- Make webpage an app (get rid of top bar) when bookmarked to home screen -->
   8  <meta name="apple-mobile-web-app-capable" content="yes" />
   9  
  10  <!-- Number keyboards -->
  11  <input type="tel" /> <input pattern="[0-9]*">
  12  
  13  <!-- URL/Emails -->
  14  <input type="url"> <input type="email">
  15  
  16  <!-- Links -->
  17  <a href="http://maps.google.com/maps?q=Moon">Open in Google Maps</a>
  18  <a href="tel:01234567890">Open the phone</a>
  19  <a href="twitter:Tweet Tweet Tweet">Open the Twitter for iPhone app</a>
created by leozera — 11 July 2011 — get a short url — tags: html html5 ios embed

hide address bar in safari mobile Delicious Email

this code lets you hide the address bar in safari mobile. your webapp will look like a native one.

show/hide lines
   1  <body onload="window.scrollTo(0, 1)">
created by leozera — 05 February 2011 — get a short url — tags: ios safari embed

iOS volume-style popup in Mobile Safari Delicious Email

preview: http://cl.ly/4AK4

show/hide lines
   1  <style>
   2  div#popup {
   3          background-color: rgba(0,0,0,.5);
   4          border-radius: 10px;
   5          color: #ffffff;
   6          font-weight: bold;
   7          font-family: Arial;
   8          height: 160px;
   9          line-height: 50px;
  10          margin: 0 auto;
  11          text-align: center;
  12          text-shadow: 0px 1px 0px #000000;
  13          -webkit-border-radius: 10px;
  14          border-radius: 10px;
  15          width: 160px;
  16  }
  17  </style>
  18  
  19  <li id="toggle">
  20          <a href="#">button <!--activates the popup--> </a>
  21  </li>
  22  
  23  <div id="popup" style="display: none">Popup...</div> 
  24  
  25  <!--popup script must be placed below the DIV--> 
  26  <script> 
  27          $("#toggle").click(function () {
  28          $("#popup").fadeIn("fast");
  29          $("#popup").delay(3500).fadeOut();
  30  });
  31  </script> 
  32  <!--/popup script--> 
created by leozera — 27 January 2011 — get a short url — tags: css ios embed