【发布时间】:2011-02-19 08:52:12
【问题描述】:
我有一个 jQuery UI 按钮,我将它放在 jqGrid 工具栏中,但按钮的内容是换行的。我试图通过使用 CSS white-space 属性来防止包装无济于事。
这是正在发生的事情的快照:
alt text http://www.freeimagehosting.net/uploads/c455ebf64e.png
这是我尝试解决问题的两个代码 sn-ps:
$("#t_imageList").css("white-space", "nowrap").html('<button>Add</button>');
$("#t_imageList button").button({
icons: {primary: 'ui-icon-plus'},
text: true
});
和/或
$("#t_imageList button").css("white-space", "nowrap").button({
icons: {primary: 'ui-icon-plus'},
text: true
});
有人遇到过同样的问题吗?如果是这样,您的解决方案是什么?
【问题讨论】: