jquery templating plugin - using a normal unnamed array?
Does anyone know if it's possible to just use a no开发者_JS百科rmal array (e.g. [1,2,3]) with the jQuery templating plugin?
It won't work like you intended. Unless you're talking about an array of objects to iterate over in your template. But because like everything else in JavaScript, Array() returns an object, which means it's a valid parameter, but I don't think anything will output, since jQuery.tmpl probably checks if the given data object is an array.
精彩评论