我遇到了jQuery UI的buttonset函数的(间歇性)问题.有时当我调用它时,它只应用它添加到容器div和第一个子节点的类,有时它会完全按预期工作.(对不起,我不能为此做一个小提琴,我不能让它在我的应用程序之外发生.)与jQuery UI 1.10.0和1.10.4相同的问题.
即我从这开始:
<div class="my-buttonset">
<input type="radio" name="option" id="option1">
<label for="option1">Option 1</label>
<input type="radio" name="option" id="option2">
<label for="option2">Option 2</label>
<!-- More elements -->
</div>
Run Code Online (Sandbox Code Playgroud)
调用buttonset后得到这个(注意单选按钮确实会添加一个不正确的类):
<div class="my-buttonset ui-buttonset">
<input class="ui-corner-left" type="radio" name="option" id="option1">
<label for="option1">Option 1</label>
<input type="radio" name="option" id="option2">
<label for="option2">Option 2</label>
<!-- Other elements unchanged -->
</div>
Run Code Online (Sandbox Code Playgroud)
而不是这个:
<div class="container-fluid-full radio-row mode-radio-row ui-buttonset">
<input class="ui-helper-hidden-accessible" type="radio" name="option" id="option1">
<label class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left ui-state-hover" for="option1" role="button" aria-disabled="false" aria-pressed="false"><span class="ui-button-text">Option 1</span></label>
<input class="ui-helper-hidden-accessible" type="radio" name="option" id="option2"> …Run Code Online (Sandbox Code Playgroud)