implement pinch to zoom
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Event</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<a href="/something">link</a>
|
||||
|
||||
<script src="../build/build.js"></script>
|
||||
|
||||
<script>
|
||||
var events = require('event');
|
||||
var a = document.getElementsByTagName('a')[0];
|
||||
|
||||
function onclick(e) {
|
||||
e = e || window.e;
|
||||
|
||||
events.unbind(a, 'click', onclick);
|
||||
|
||||
console.log(e);
|
||||
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
events.bind(a, 'click', onclick);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user