jquery:将变量添加到变量中

tes*_*mus 1 jquery

如何将变量值添加到新变量中?我正在修改新闻滑块,我想在字幕中插入"日期"

我试过的:

(function( $ ){
        $.fn.accessNews = function(settings){

                $now = new Date();
                var defaults = {
                        // title for the display
                        title: "news:",
                        // subtitle for the display
                        subtitle: "$now",
Run Code Online (Sandbox Code Playgroud)

Vis*_*ioN 10

取消引用它:

{
    // ...

    subtitle: $now,
}
Run Code Online (Sandbox Code Playgroud)