Bug Tracker

Modify

Ticket #7049 (closed feature: fixed)

Opened 4 years ago

Last modified 3 years ago

making jQuery.noConflict() callable anytime

Reported by: jclain Owned by:
Priority: low Milestone: 1.6
Component: core Version: 1.4.2
Keywords: noConflict Cc:
Blocking: Blocked by:

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

jquery.js.patch Download (356 bytes) - added by jclain 4 years ago.
this patch is against the nightly build as of sept 18, 2010

Change History

Changed 4 years ago by jclain

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

comment:1 follow-up: ↓ 2 Changed 4 years ago by snover

  • Priority set to low
  • Status changed from new to open
  • Milestone 1.4.3 deleted

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

Last edited 4 years ago by snover (previous) (diff)

comment:2 in reply to: ↑ 1 Changed 3 years ago by jclain

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:3 Changed 3 years ago by snover

3rd party  pull request

comment:4 follow-up: ↓ 5 Changed 3 years ago by rwaldron

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

comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 3 years ago by 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.

hello,

should I submit another pull request, or will you fix the patch? thanks in advance

comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 3 years ago by jclain

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 in reply to: ↑ 6 Changed 3 years ago by jclain

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 3 years ago by john

  • Status changed from open to closed
  • Resolution set to fixed
  • Milestone set to 1.6

Landed.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.