jQuery's dialog plugin
What's开发者_如何学C the point of storing the ui-dialog-title object in the uiDialogTitle variable, if the variable is never used anywhere in code?
uiDialogTitle = $('<span></span>')
.addClass('ui-dialog-title')
.attr('id', titleId)
.html(title)
.prependTo(uiDialogTitlebar);
If the variable is never used, don't store the value into a variable.
$('<span></span>')
.addClass('ui-dialog-title')
.attr('id', titleId)
.html(title)
.prependTo(uiDialogTitlebar);
This will accomplish the same.
精彩评论