【问题标题】:Bootstrap 3.3.7 glyphicons not working for jQueryUi 1.12Bootstrap 3.3.7 字形图标不适用于 jQueryUi 1.12
【发布时间】:2017-05-12 17:15:38
【问题描述】:

向 jQuery UI 滑块按钮动态添加两个字形图标时,不会显示这些字形图标。降级到 jQuery UI 1.10 解决了这个问题:

不工作:jsfiddle

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>  
$('#slider a').html('<label><span class="glyphicon glyphicon-chevron-left"></span><span class="glyphicon glyphicon-chevron-right"></span></label>');

工作:jsfiddle

<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
$('#slider a').html('<label><span class="glyphicon glyphicon-chevron-left"></span><span class="glyphicon glyphicon-chevron-right"></span></label>');

有什么想法吗?我不想降级。

【问题讨论】:

标签: jquery twitter-bootstrap jquery-ui glyphicons


【解决方案1】:

我认为使用 glyphicons 的正确方法是使用 &lt;i&gt; 标签 (否)
但是将$('#slider a') 更改为$('#slider span') 将起作用。
干杯

【讨论】:

  • &lt;span&gt; 很好。
猜你喜欢
  • 2021-07-14
  • 2015-02-24
  • 1970-01-01
  • 2023-04-03
  • 2015-07-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-01-15
相关资源
最近更新 更多