Change loadable text-text in Bootstrap globally

I would like to change the text Button.DEFAULTS.loadingText

in Bootstrap 3.2.0

globally at once, so that I don't need to set .button()

it by the caller like in this answer :

$('button').data('loading-text', 'Bezig...');
// or
$('button').button({loadingText: 'Bezig...'});

      

This setup method above doesn't work for me because my "buttons" are dynamically generated. This is why I need it loadingText

to be set as global.

Is there something like this?

 $.fn.bootstrap.Button.DEFAULTS.loadingText = "Bezig...";

      

+3


source to share


1 answer


I found a solution:

<script type="text/javascript">
$.fn.button.Constructor.DEFAULTS.loadingText = 'Bezig...';
</script>

      



This needs to be added after downloading bootstrap.js

.

+2


source







All Articles