@ -2,6 +2,7 @@
< head >
< head >
< title > Timeline | Tooltip on item onUpdateTime Option< / title >
< title > Timeline | Tooltip on item onUpdateTime Option< / title >
< script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" > < / script >
< script src = "../../../dist/vis.js" > < / script >
< script src = "../../../dist/vis.js" > < / script >
< link href = "../../../dist/vis.css" rel = "stylesheet" type = "text/css" / >
< link href = "../../../dist/vis.css" rel = "stylesheet" type = "text/css" / >
@ -63,20 +64,20 @@
editable: true
editable: true
};
};
var options1 = Object.assign( {
var options1 = jQuery.extend(options, {
tooltipOnItemUpdateTime: true
tooltipOnItemUpdateTime: true
}, options )
})
var container1 = document.getElementById('mytimeline1');
var container1 = document.getElementById('mytimeline1');
timeline1 = new vis.Timeline(container1, items, null, options1);
timeline1 = new vis.Timeline(container1, items, null, options1);
var options2 = Object.assign( {
var options2 = jQuery.extend(options, {
orientation: 'top',
orientation: 'top',
tooltipOnItemUpdateTime: {
tooltipOnItemUpdateTime: {
template: function(item) {
template: function(item) {
return 'html template for tooltip with < b > item.start< / b > : ' + item.start;
return 'html template for tooltip with < b > item.start< / b > : ' + item.start;
}
}
}
}
}, options )
})
var container2 = document.getElementById('mytimeline2');
var container2 = document.getElementById('mytimeline2');
timeline2 = new vis.Timeline(container2, items, null, options2);
timeline2 = new vis.Timeline(container2, items, null, options2);
@ -117,10 +118,10 @@
}
}
var options3 = Object.assign( {
var options3 = jQuery.extend(options, {
orientation: 'top',
orientation: 'top',
tooltipOnItemUpdateTime: true
tooltipOnItemUpdateTime: true
}, options )
})
var container3 = document.getElementById('mytimeline3');
var container3 = document.getElementById('mytimeline3');
timeline3 = new vis.Timeline(container3, itemsWithGroups, groups, options3);
timeline3 = new vis.Timeline(container3, itemsWithGroups, groups, options3);