【发布时间】:2011-07-26 14:56:09
【问题描述】:
我通过如下数组将一个 jQuery 对象从另一个文件传递到一个函数中:
$(document).bind("loadStoreDisplayCallGoals", function(source, urlParams)
{
var selectedStoreDocument = urlParams["storeDocument"];
}
selectedStoreDocument 应该是一个 jQuery 对象,但是 Visual Studio Intellisense 永远不会这样识别它。我尝试使用$.extend 添加扩展selectedStoreDocument:
// cast selectedStoreDocument to a jQuery type
$.extend(selectedStoreDocument, $);
但是,扩展 selectedStoreDocument 消除了我所有的 jQuery 方法(.each、.find 等)。
如何让selectedStoreDocument 在 IntelliSense 中显示为 jQuery 对象?请注意,我正在使用 Visual Studio 2010。
【问题讨论】:
标签: javascript visual-studio visual-studio-2010 intellisense