开发者

jQuery's dialog plugin

开发者 https://www.devze.com 2023-01-31 00:42 出处:网络
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?

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.

0

精彩评论

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

关注公众号