【发布时间】:2010-06-23 20:12:54
【问题描述】:
可能重复:
For the function (function($){})(), I’ve seen it with the word jQuery in it, why is that?
谁能解释一下 jQuery 源文件中使用的以下语法?我正在学习 jQuery 并尝试编写 jquery.ui.widget。
(function ($)
{
... code ...
} (jQuery));
虽然我使用的是 jQuery,但我猜这实际上只是一个 JavaScript 问题。
谢谢, 克雷格
【问题讨论】:
-
查看昨天的类似问题:stackoverflow.com/questions/3090284/…
-
确实与 JavaScript 相关,请参阅 stackoverflow.com/questions/1643321/… 等。
标签: javascript jquery