mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
Moving to gesture-based event handling
This commit is contained in:
22
example/adams/events.html
Normal file
22
example/adams/events.html
Normal file
@ -0,0 +1,22 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example</title>
|
||||
|
||||
<!-- Sets initial viewport load and disables zooming -->
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" href="../../dist/framework-with-theme.css">
|
||||
<link rel="stylesheet" href="app.css">
|
||||
<script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content content-padded">
|
||||
<a href="#" class="button button-success">Tap me!</a>
|
||||
<a href="#" class="button button-success">Swipe me!</a>
|
||||
<div id="event-log"></div>
|
||||
</div>
|
||||
<script src="../../js/framework/framework-events.js"></script>
|
||||
<script src="events.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -13,8 +13,10 @@
|
||||
<body>
|
||||
<div class="content content-padded">
|
||||
<a href="#" class="button button-success">Tap me!</a>
|
||||
<a href="#" class="button button-success">Swipe me!</a>
|
||||
<div id="event-log"></div>
|
||||
</div>
|
||||
<script src="../../js/framework/framework-gestures.js"></script>
|
||||
<script src="../../js/framework/framework-events.js"></script>
|
||||
<script src="events.js"></script>
|
||||
</body>
|
||||
|
||||
@ -12,3 +12,10 @@ window.FM.on('tap', function(e) {
|
||||
event: e
|
||||
});
|
||||
});
|
||||
window.FM.on('touch', function(e) {
|
||||
console.log('GOT TOUCH', e);
|
||||
logEvent({
|
||||
type: 'touch',
|
||||
event: e
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user