* Add initial experiment
* Register drag and drop events
* Add initial drag and drop support
* Add drag and drop support for all types of objects
* Fix example
* Clean up code and add comments
* Fix example
* remove font awesome
* Fix example style
* Add meta tag to example and add selected when dropped
<p>For this to work, you will have to define your own <code>'dragstart'</code> eventListener on each item in your list of items (make sure that any new item added to the list is attached to this eventListener 'dragstart' handler). This 'dragstart' handler must set <code>dataTransfer</code> - notice you can set the item's information as you want this way.</p>
<divid="mytimeline"></div>
<div>
<h3>Items:</h3>
<ulclass="items">
<lidraggable="true"class="item">
item 1 - box
</li>
<lidraggable="true"class="item">
item 2 - point
</li>
<lidraggable="true"class="item">
item 3 - range
</li>
</ul>
</div>
<script>
// create groups
var numberOfGroups = 3;
var groups = new vis.DataSet()
for (var i = 0; i <numberOfGroups;i++){
groups.add({
id: i,
content: 'Truck ' + i
})
}
// create items
var numberOfItems = 10;
var items = new vis.DataSet();
var itemsPerGroup = Math.round(numberOfItems/numberOfGroups);
for (var truck = 0; truck <numberOfGroups;truck++){
var date = new Date();
for (var order = 0; order <itemsPerGroup;order++){