Afflatus Afflatus - 2 years ago 220
Javascript Question

Formatted tooltip in Semantic UI

I want to add a formatted tooltip to one of my div but I can't get it right. this is what I have:

render() {
var scope = this,
getTooltip = function(product){
return ('<div>' +
'<div>Stock <div className="right floated">' + product.stock + '</div></div>' +
return (
<span data-html={getTooltip(product)}>{product.Stock()}</span>

what am I missing?

Answer Source

Have you added the jQuery to initiate the tooltip as your component is mounted?

componentDidMount() {
       position : 'left',
       inline: true
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download