我的应用程序使用-换行保存明文。
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse porttitor mauris cursus neque vehicula scelerisque.
Proin eget euismod purus
在显示此数据时,我确保使用css保留换行。
// Sequences of whitespace will collapse into a single whitespace.
// Text will wrap when necessary, and on li
所以我知道如何使用.wrap、.wrapInner和.wrapAll,但我想知道如何结合使用jQuery 1.4中引入的快速创建语法和wrap函数。
基本上,我希望能够使用
var targetUl = $(this), // would be populated by script
maxWidth = 1400; // would be populated by script
$('<div />', {
'id':'wrap',
'css': {
'widt