Reputation: 364
I am facing following error while I am trying to use Twitter bootstrap ToolTip.
Uncaught Error: cannot call methods on tooltip prior to initialization; attempted to call method 'show'
Javascript code is :
$("#exclamation-sign").tooltip('show');
Upvotes: 0
Views: 786
Reputation: 30300
As described in the documentation, you need to initialize the tooltips before calling methods on them.
So you need to do, for example
$("#exclamation-sign").tooltip({ 'animation': true, 'title': 'My Tooltip' });
To initialize it. The options
are described in the table right there in the documentation.
Then when you're ready,
$("#exclamation-sign").tooltip('show');
Upvotes: 2