implement pinch to zoom

This commit is contained in:
marlon-erler
2026-08-30 16:15:14 +02:00
parent ea50704f8a
commit 7eb02f07dc
160 changed files with 15806 additions and 61 deletions
+55
View File
@@ -0,0 +1,55 @@
<html>
<head>
<title>Event</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<ul>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
<ul id="list-two">
<li><a href="#">One</a></li>
</ul>
<ul>
<li><span>one</span></li>
</ul>
<button>Button</button>
<script src="../build/build.js"></script>
<script>
var delegate = require('delegate');
var uls = document.querySelectorAll('ul');
var n = 0;
var fn = delegate.bind(uls[0], 'li a', 'click', function(e){
console.log(e.target);
if (++n >= 3) {
console.log('unbind');
delegate.unbind(uls[0], 'click', fn, false);
}
}, false);
var fn2 = delegate.bind(uls[1], 'li a', 'click', function(e){
console.log(e.target);
if (++n >= 8) {
console.log('unbind');
delegate.unbind(uls[1], 'click', fn2, false);
}
}, false);
var fn3 = delegate.bind(uls[2], 'li', 'click', function(e){
console.log(e.target);
if (++n >= 8) {
console.log('unbind');
delegate.unbind(uls[2], 'click', fn2, false);
}
}, false);
</script>
</body>
</html>