How can I add the below hot fix outside of bootstrap core files?
This question has been posted before, and the hot fix does work like a charm. But it requires editing core files. here!
In the Tooltip.prototype.show function:
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
.addClass(placement)
Adding the add-class below works likes a charm:
.addClass(this.$element.attr("data-class"))
So now whenever you add data-class
to the popover call, it will add the attribute to the <div class="popover">
div.
The down side is that you have to edit core files to achieve this. I'm only slightly versed it jQuery and this has racking my brain, but I think there must be a way to tack on that .addClass() as an extension to the Tooltip Prototype. Maybe using .extend()?