• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to use noConflict to get JQuery and Ajax (Wonder) working together?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use noConflict to get JQuery and Ajax (Wonder) working together?


  • Subject: Re: How to use noConflict to get JQuery and Ajax (Wonder) working together?
  • From: Timo Hoepfner <email@hidden>
  • Date: Thu, 5 Aug 2010 10:56:23 +0200

Hi David,

Am 05.08.2010 um 01:10 schrieb David BON:

I read on this link: Using jQuery with Other Libraries that I have to insert in the <head> section the noConflict() function:

I've used a different approach mentioned on the same page once: Load jQuery before prototype and then wrap jquery code into jQuery(function($){...});


In the PageWrapper's head section:

<!-- load jquery -->
<wo:ERXJavaScript framework = "app" filename = "jquery/ jquery-1.4.2.min.js" />
<!-- Load prototype after jquery, this replaces the definition of the $ function with the prototype one -->
<wo:ERXJavaScript framework = "Ajax" filename = "prototype.js" />


And then in the component:

<script type = "text/javascript">
jQuery(function($){
// $ is jQuery's $ here, not Prototype's. Do some jQuery stuff here.
});
</script>


This will probably only work, if the third party jQuery library you are using is built cleanly. In my case it was the date picker from jQuery UI and it worked fine. I'd still be careful when mixing different JS libraries though...

Timo

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to use noConflict to get JQuery and Ajax (Wonder) working together?
      • From: David BON <email@hidden>
References: 
 >How to use noConflict to get JQuery and Ajax (Wonder) working together? (From: David BON <email@hidden>)

  • Prev by Date: Re: two different databases at same time?
  • Next by Date: migrations and dropping sequences..
  • Previous by thread: Re: How to use noConflict to get JQuery andAjax(Wonder)workingtogether?
  • Next by thread: Re: How to use noConflict to get JQuery and Ajax (Wonder) working together?
  • Index(es):
    • Date
    • Thread