我正在使用fuelux微调器,它在页面加载时应用微调器但在我追加包含微调器div的HTML代码时无法应用微调器。 CSS也受到了干扰
<!-- Loaded spinner having button + and - to input box STARTS -->
<div class="shape-sp">
<div class="spinner-my">
<div class="input-group">
<input type="text" maxlength="1" class="spinner-input form-control">
<div class="spinner-buttons input-group-btn btn-group-vertical">
<button class="btn spinner-up btn-xs default" type="button">
<i class="fa fa-angle-up"></i>
</button>
<button class="btn spinner-down btn-xs default" type="button">
<i class="fa fa-angle-down"></i>
</button>
</div>
</div>
</div>
</div>
HTMLCODE = /* It contains HTML code that will get appended to MYDIV */;
$("#mydiv").append(HTMLCODE);
<div id="mydiv"> </div>
答案 0 :(得分:1)
添加后,您需要在元素上调用$('spinner-my').spinner();
。并且您将需要使用.spinner类用于CSS,页面顶部使用.fuelux类作为父级。