开发者

use Jquery to check checkbox in Jquery buttonset

I have some checkboxes in a button set and I want to use Jquery to check one of the checkboxes.

It works, however, the visual representation of the checkbox does not update. ie, after executing $('#chk').attr('checked',true); the checked value is true, but the checkbox apears unchecked.

Demoed here: http://jsfiddle.net/kralco626开发者_运维百科/jzVjT/1/

Thanks!


You need to call the refresh method on the buttonset to update the visual state after programmatic changes to the checked state, like this:

$("#test").buttonset("refresh");

You can test it out here.


Try

'true'

rather than

true

Attributes are always string values.

Edit:

Never mind. No clue on buttonset functionality but things aren't behaving normally. Check the documentation for the API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜