开发者

Jquery button label option does not work with input type checkbox

Demoed here: http://jsfiddle.net/dRtaR/2/

The label option of the Jquery UI button does not work.

My goal i开发者_C百科s to have a label on the button WITHOUT having to specify a </label> html tag.

Can I do this?


Not with this jQueryUI method. From the .button() overview tab:

In addition to basic push buttons, radio buttons and checkboxes (inputs of type radio and checkbox) can be converted to buttons: Their associated label is styled to appear as the button, while the underlying input is updated on click.

When you specify button on a checkbox or radio button it hides the input and styles the associated label.

Is there any reason you can't just write out the label? If you don't have access to the html you could write it out with jQuery. See this horrible example. It might give you an idea of where to look next.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜