comparison src/examples/simple.html @ 7:332d3e280f7e

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 23 Apr 2023 20:46:17 -0600
parents 6d5e4b38b4fb
children
comparison
equal deleted inserted replaced
6:4d699321068f 7:332d3e280f7e
4 <meta name="viewport" content="width=device-width, initial-scale=1"> 4 <meta name="viewport" content="width=device-width, initial-scale=1">
5 <style> 5 <style>
6 @import "/site.css"; 6 @import "/site.css";
7 @import "/dad.css"; 7 @import "/dad.css";
8 8
9 span[drag] { 9 [drag] {
10 display: inline-block; 10 display: inline-block;
11 background-color: LightGreen; 11 background-color: LightGreen;
12 padding: 8px; 12 padding: 8px;
13 } 13 }
14 </style> 14 </style>
15 <script src="/dad.js"></script> 15 <script src="/dad.js"></script>
16 <script> 16 <script>
17 function init() { 17 function init() {
18 let span = document.querySelector('span[drag]'); 18 let drag = document.querySelector('[drag]');
19 dad.setDraggable(span); 19 dad.setDraggable(drag);
20 } 20 }
21 </script> 21 </script>
22 </head> 22 </head>
23 <body> 23 <body>
24 <h1>Simple</h1> 24 <h1>Simple</h1>