Change a Tooltip's text after initialization in Bootstrap

Change a Tooltip's text after initialization in Bootstrap

Last updated:

Useful if you need to change a tooltip's text after it has been initialized:

$(this).tooltip('hide')
      .attr('data-original-title', 'new text')
      .tooltip('show');

There are some variations on this on this post about changing the tooltip text on stackoverflow, but this shorter version I've printed here seems to have done the job for us.