I noticed that my twitter bootstrap tooltips were not respecting data-position
.
So, I headed over to the Twitter Bootstrap tooltips demo, specifically looki
I think it's a bug. From http://twitter.github.com/bootstrap/assets/js/application.js you can see the demo is called with 'selector' option.
$('.tooltip-demo').tooltip({
selector: "a[data-toggle=tooltip]"
});
But the 'show' function in bootstrap-tooltip.js will not check for 'selector' option when handling 'placement'. Therefore bug occurred.
placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
Demo for this bug: http://jsfiddle.net/indream/xFC7G/
Related github issue: https://github.com/twitter/bootstrap/issues/6832