Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript 框架设计精简索引 #8

Open
ascoders opened this issue Oct 31, 2016 · 0 comments
Open

Javascript 框架设计精简索引 #8

ascoders opened this issue Oct 31, 2016 · 0 comments

Comments

@ascoders
Copy link
Owner

种子模块

命名空间

var _$ = window.$ // 把非 jquery 产生的 $ 存起来

jQuery.extend({
    noConflict: function () {
        window.$ = _$ // 用非 jquery 的 $ 覆盖自己的 $
        return jQuery // 返回自身,接住的就是 jquery,例如 var my_$ = $.noConflict()
    }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant