Opened 13 years ago
Closed 12 years ago
#7049 closed feature (fixed)
making jQuery.noConflict() callable anytime
Reported by: | jclain | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.6 |
Component: | core | Version: | 1.4.2 |
Keywords: | noConflict | Cc: | |
Blocked by: | Blocking: |
Description
hello,
I use jQuery in an environnement where other js library than jquery are loaded, and the loading order of libraries may be difficult to control properly. I use a code like this in all my pages (this is autogenerated):
jQuery.noConflict()(function ($) { ... });
I understand that jQuery.noConflict() should only be callled if jquery is loaded *after* the other library. I would like noConflict() to be callable anytime. I attach a patch that return control of $ and jQuery only if really necessary
This patch work for me. But if there are any defiencies in this code that can't see, please let me know
with best regards, jephte clain
Attachments (1)
Change History (9)
Changed 13 years ago by
Attachment: | jquery.js.patch added |
---|
comment:1 follow-up: 2 Changed 13 years ago by
Milestone: | 1.4.3 |
---|---|
Priority: | → low |
Status: | new → open |
The best way to get patches into core is to submit them as pull requests on [GitHub http://github.com].
comment:2 Changed 13 years ago by
Replying to snover:
The best way to get patches into core is to submit them as pull requests on GitHub.
hello, I submitted a pull-request.
regards, jephte clain
comment:4 follow-up: 5 Changed 13 years ago by
snover, this patch does not conform to the current source style. The if statement must have opening and closing curly braces.
comment:5 follow-up: 6 Changed 13 years ago by
Replying to rwaldron:
snover, this patch does not conform to the current source style. The if statement must have opening and closing curly braces.
hello,
should I submit another pull request, or will you fix the patch? thanks in advance
comment:6 follow-up: 7 Changed 13 years ago by
Replying to jclain:
Replying to rwaldron:
snover, this patch does not conform to the current source style. The if statement must have opening and closing curly braces.
should I submit another pull request, or will you fix the patch? thanks in advance
I modified the code to respect current source style. it seems to have automatically merged with the pull request on github regards, jephte clain
comment:7 Changed 13 years ago by
Replying to jclain:
I modified the code to respect current source style. it seems to have automatically merged with the pull request on github
well... I may have screwed the pull request. I hope you can sort it out.
comment:8 Changed 12 years ago by
Milestone: | → 1.6 |
---|---|
Resolution: | → fixed |
Status: | open → closed |
Landed.
this patch is against the nightly build as of sept 18, 2010