First there's the question of whether or not to directly generate the HTML required for a tooltip or to fallback on adding a command to the JavaScript lib that calls the .tooltip() function on a given selector.
If creating the HTML ourselves, then a Tooltip object is needed which well generate the necessary div elements to do so and bind the events properly. The last part is what makes me think its best to do it all directly in JS because it would save websocket bandwidth, as there is no need to query our python code on every mouse over simply to set something that we already know we're going to set.
If not creating the HTML, then we could implement a simple tooltip function that takes an existing object and sets the appropriate data-toggle="tooltip"data-placement and title attributes such that the tooltip is generated at the client side.
Must support click, hover, focus and manual triggers, as well as delay, animation, placement and viewport settings.
First there's the question of whether or not to directly generate the HTML required for a tooltip or to fallback on adding a command to the JavaScript lib that calls the
.tooltip()
function on a given selector.If creating the HTML ourselves, then a
Tooltip
object is needed which well generate the necessarydiv
elements to do so and bind the events properly. The last part is what makes me think its best to do it all directly in JS because it would save websocket bandwidth, as there is no need to query our python code on every mouse over simply to set something that we already know we're going to set.If not creating the HTML, then we could implement a simple
tooltip
function that takes an existing object and sets the appropriatedata-toggle="tooltip"
data-placement
andtitle
attributes such that the tooltip is generated at the client side.Must support
click
,hover
,focus
andmanual
triggers, as well asdelay
,animation
,placement
andviewport
settings.