admin管理员组文章数量:1335448
I am using /. I am using multi-select dropdown. On selecting some items, it shows its default title "x items selected". I want to change its text to "x some_other_word selected.". Anyone tell me, if this plugin provides any option to change the title text.
I am using https://silviomoreto.github.io/bootstrap-select/. I am using multi-select dropdown. On selecting some items, it shows its default title "x items selected". I want to change its text to "x some_other_word selected.". Anyone tell me, if this plugin provides any option to change the title text.
Share Improve this question asked Nov 2, 2015 at 10:28 sanjeev1779sanjeev1779 781 silver badge8 bronze badges3 Answers
Reset to default 5you can use "data-count-selected-text"
<select class="selectpicker" multiple data-selected-text-format="count>3"
data-count-selected-text= "{0} some_other_word selected">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
<option>Onions</option>
</select>
Instead of using the "count format" use
<select class="selectpicker" multiple data-selected-text-format="count>3">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
<option>Onions</option> </select>
or you can directly edit the plugin and add extended option to define your default "selected" text format.
Add title value to "x some_other_word selected".
<select class="selectpicker" title="x some_other_word selected.">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</select>
本文标签: javascriptSelectpicker title change textStack Overflow
版权声明:本文标题:javascript - Selectpicker title change text - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742375973a2463170.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论