twitter/bootstrap — Issue #2234: Custom class and ID names for components
Author: hostliketoast
Created: 2012-02-24 15:03:25+00:00
State: open

So, I wanted to customise a specific "popover" size and style, but there is currently no way to do this.

In bootstrap.js, around line 1151, I added a quick
if ( this.options['class'] != undefined ) {
$tip.addClass( this.options['class'] );
}

if ( this.options['id'] != undefined ) {
$tip.attr( 'id', this.options['id'] );
}

This type of customisation should be standard for all generated components. This means when you are supplying the configuration you can set an ID or class. Demo: $('element').popover( { placement: 'bottom', id: 'myCustomPopover' } );