036-manual.html (928B)
1 <!DOCTYPE html> 2 <?xml version="1.0" encoding="utf-8"?> 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <title>Drag feedback when multiple elements are added to dragstore</title> 6 <style type="text/css"> 7 div > div 8 {height:100px; 9 width:100px; 10 float:left; 11 background-color:navy;} 12 div + div 13 {margin-left:-60px; 14 background-color:maroon;} 15 div[draggable] 16 {background-color:teal; 17 margin-top:50px;} 18 </style> 19 <script type="application/ecmascript"> 20 function start(event) 21 {var div = document.querySelectorAll('div > div:nth-child(odd)'); 22 event.dataTransfer.effectAllowed = 'copy'; 23 for(var i = 0; i != div.length; i++) 24 {event.dataTransfer.addElement(div[i]);} 25 } 26 </script> 27 </head> 28 <body> 29 <p>Try to drag green box below. Feedback overlay should include all three boxes when you drag green one.</p> 30 <div ondragstart="start(event)"> 31 <div></div> 32 <div draggable="true"></div> 33 <div></div> 34 </div> 35 </body> 36 </html>