Page_zoom.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <!--
  5. NOTE viewport is set so user can scale
  6. -->
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
  8. <meta http-equiv="x-ua-compatible" content="IE=9">
  9. <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
  10. <link href="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css" rel="stylesheet" />
  11. <link href="css/main.css" type="text/css" rel="stylesheet" />
  12. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  13. <script type="text/javascript" src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
  14. <script type="text/javascript" src="../jquery.touchSwipe.js"></script>
  15. <script type="text/javascript" src="js/main.js"></script>
  16. <title>touchSwipe</title>
  17. </head>
  18. <body>
  19. <a href="https://github.com/mattbryson"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub"></a>
  20. <div class="container">
  21. <script id='code_1'>
  22. $(function() {
  23. $("#test").swipe( {
  24. swipeLeft:function(event, direction, distance, duration, fingerCount) {
  25. $(this).text("You swiped " + direction );
  26. },
  27. fingers:1,
  28. threshold:0
  29. });
  30. });
  31. </script>
  32. <span class='title'></span>
  33. <h4>property: <span class='properties'><code>fingers</code></span></h4>
  34. <p>If just one <code>finger</code> is set for swipes, at the meta tag enables user-scaling, then page zooms will bubble up and trigger.</p>
  35. <pre class="prettyprint lang-html">&lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/&gt;</pre>
  36. <button class='btn btn-small btn-info example_btn'>Jump to Example</button>
  37. <pre class="prettyprint lang-js" data-src="code_1"></pre>
  38. <span class='navigation'></span>
  39. <div id="test" class="box">I only swipe left, but you can pinch zoom me as I only capture 1 finger</div>
  40. <span class='navigation'></span>
  41. </div>
  42. </body>
  43. </html>