Chr*_*art 1 javascript jquery operators jquery-plugins
也许我现在太累了,但我找不到插件开发人员使用以下结构的原因:
jQuery.<myPlugin> || (function($)) {
var $.<myPlugin> = {
// plugin code goes here...
}
})(jQuery);
Run Code Online (Sandbox Code Playgroud)
当然这是一个常见的结构,除了使用||(据我所知的OR运算符),我不明白.
你能告诉我为什么开发人员使用了||吗?
| 归档时间: |
|
| 查看次数: |
64 次 |
| 最近记录: |