0

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');

robieee
  • 364
  • 2
  • 18

1 Answers1

2

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');
mujaffars
  • 1,395
  • 2
  • 15
  • 35
Vidya
  • 29,932
  • 7
  • 42
  • 70