How to set the default value manually in twitter bootstrap 2 and twitter bootstrap 3?
I have the following code, you can see the same properties in the options being used over again (I have to overwrite them because they are required to be different from the defaults).
The three properties that are used over again are trigger
placement
& html
.
How I can override the default options set by twitter bootstrap in my javascript?
Javascript (On DOM Ready)
$('.pop1').popover({
trigger: 'hover',
placement : 'right',
html: true, // used once (and the 2 above)
title : 'My title for popover1',
content : 'My content with popover1'
});
$('.pop2').popover({
trigger: 'hover', //used again
placement : 'right',
html: true,
title : 'My title for popover2',
content : 'My content with popover2'
});
$('.pop3').popover({
trigger: 'hover', //and again!
placement : 'right',
html: true,
title : 'My title for popover3',
content : 'My content with popover3'
});
HTML:
<span class="pop1"><i class="icon-info-sign"></i></span>
<span class="pop2"><i class="icon-info-sign"></i></span>
<span class="pop3"><i class="icon-info-sign"></i></span>
I wanted something like jQuery validators (& other plugins): jQuery.validator.setDefaults()
So basically, how can I set the bootstrap default values for twitter bootstrap 2 and twitter bootstrap 3?, I would like it so bootstrap uses my custom default values so I don't have to override them over and over again throughout my code, How can I customize it so the default value is one specified by me and not Twitter Bootstrap 2 or Twitter Bootstrap 3.