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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to