更改bootstrap的默认数据加载文本 [英] Change default data-loading-text for bootstrap
本文介绍了更改bootstrap的默认数据加载文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于我正在建立一个荷兰语网站,我希望在荷兰语的引导按钮上加载文本。默认情况下,文本是正在加载...
我可以更改此默认值而无需添加 data-loading-text =Bezig ...
在每个按钮中?
Since I'm building a Dutch website I would like to have the loading text on bootstrap buttons in Dutch as well. By default the text is Loading...
can I change this default without having to add data-loading-text="Bezig..."
in every button?
推荐答案
您可以在加载时使用data属性'初始化'按钮使用标准jQuery的页面:
You can 'initialize' your buttons with the data attribute when you load the page using standard jQuery:
$('button').data('loading-text', 'Bezig...');
或者,你可以设置按钮组件的选项,就像你在Bootstrap中的其他组件一样:
OR, you can set the options for the button component like you would other components in Bootstrap:
$('button').button({loadingText: 'Bezig...'});
这篇关于更改bootstrap的默认数据加载文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文