<div id="carat_weight_right" style="margin-top: 15px;float:left;width:444px;border-width:1px 0px 1px 0 ;border-style:solid; border-color:#327B84;padding-top:10px;padding-bottom:33px;*padding-bottom:59px;">
<fieldset style="padding-left:20px;padding-bottom:10px;width:415px;margin-top:3px;font-size;10px;">
<--- start auto gen using js / java third party tool for sliders using the filament slider tool ---->
<ol class="ui-slider-scale ui-helper-reset" role="presentation">
<li style="left:0.00%"><span class="ui-slider-label ui-slider-label-show" style="margin-left: -11.5px; ">FAIR</span><span class="ui-slider-tic ui-widget-content" style="display: none;"></span></li>
<li style="left:25.00%"><span class="ui-slider-label ui-slider-label-show" style="margin-left: -15.5px; ">GOOD</span><span class="ui-slider-tic ui-widget-content"></span></li>
<li style="left:50.00%"><span class="ui-slider-label ui-slider-label-show" style="margin-left: -15.5px; ">VERY GOOD</span><span class="ui-slider-tic ui-widget-content"></span></li>
<li style="left:75.00%"><span class="ui-slider-label ui-slider-label-show" style="margin-left: -15px; ">IDEAL</span><span class="ui-slider-tic ui-widget-content"></span></li>
<li style="left:100.00%"><span class="ui-slider-label ui-slider-label-show" style="margin-left: -30px; ">SIGNATURE IDEAL</span><span class="ui-slider-tic ui-widget-content" style="display: none;"></span></li></ol>
<--- end auto genereted list ---->
</fieldset>
</div>
我想要做的是能够选择这个 < li style="left:100.00%"> 并更改上面的 < li style="left:100.00%"> 中的跨度样式?
如何使用 jquery 在
谢谢
最佳答案
CSS 截断小数点。
$('li').css('left', function(index, value) {
if (value === '100%') {
$(this).children('span').css(''); //Do what you wish here
}
});
关于jquery - 在动态生成的列表中选择列表元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5940473/