Skip to main content

Bug Tracker

Side navigation

#7049 closed feature (fixed)

Opened September 18, 2010 09:07AM UTC

Closed April 12, 2011 08:27PM UTC

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)
  • jquery.js.patch (0.3 KB) - added by jclain September 18, 2010 09:07AM UTC.

    this patch is against the nightly build as of sept 18, 2010

Change History (8)

Changed October 14, 2010 09:59PM UTC by snover comment:1

_comment0: The best way to get patches into core is to submit them as [http://help.github.com/pull-requests/ pull requests] on [GitHub http://github.com].1287093572648919
milestone: 1.4.3
priority: → low
status: newopen

The best way to get patches into core is to submit them as pull requests on GitHub.

Changed November 08, 2010 04:52AM UTC by jclain comment:2

Replying to [comment:1 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

Changed November 21, 2010 10:55PM UTC by snover comment:3

3rd party pull request

Changed November 21, 2010 10:58PM UTC by rwaldron comment:4

snover, this patch does not conform to the current source style. The if statement must have opening and closing curly braces.

Changed November 22, 2010 03:12AM UTC by jclain comment:5

Replying to [comment:4 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

Changed November 22, 2010 04:17AM UTC by jclain comment:6

Replying to [comment:5 jclain]:

Replying to [comment:4 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

Changed November 22, 2010 04:37AM UTC by jclain comment:7

Replying to [comment:6 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.

Changed April 12, 2011 08:27PM UTC by john comment:8

milestone: → 1.6
resolution: → fixed
status: openclosed

Landed.