View Full Version : Animated Collapsible DIV v2.4 jquery no conflict

10-31-2009, 03:42 PM
1)Animated Collapsible DIV v2.4:
Hello what about the jQuery.noConflict ();
for animatet from collapse?

mootools wants to run

10-31-2009, 04:57 PM
As far as I can see, the code is already written in noConflict syntax, it simply lacks a formal declaration. So just make sure that the external script tags for jQuery and this script come before mootools in the head. If you like, you may also add the formal declaration to the code:

//** Animated Collapsible DIV v2.0- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** May 24th, 08'- Script rewritten and updated to 2.0.
//** June 4th, 08'- Version 2.01: Bug fix to work with jquery 1.2.6 (which changed the way attr() behaves).
//** March 5th, 09'- Version 2.2, which adds the following:
//1) ontoggle($, divobj, state) event that fires each time a DIV is expanded/collapsed, including when the page 1st loads
//2) Ability to expand a DIV via a URL parameter string, ie: index.htm?expanddiv=jason or index.htm?expanddiv=jason,kelly

//** March 9th, 09'- Version 2.2.1: Optimized ontoggle event handler slightly.
//** July 3rd, 09'- Version 2.4, which adds the following:
//1) You can now insert rel="expand[divid] | collapse[divid] | toggle[divid]" inside arbitrary links to act as DIV togglers
//2) For image toggler links, you can insert the attributes "data-openimage" and "data-closedimage" to update its image based on the DIV state


var animatedcollapse={
divholders: {}, //structure: {div.id, div.attrs, div.$divref, div.$togglerimage}
divgroups: { . . .

Even with that, it is best that the jQuery scripts come first. This makes it easiest for mootools to override and gain control of the $ variable for its sole use outside the jQuery scripts.

10-31-2009, 08:24 PM
when i take the jQuery.noConflict();
in it then is nothing the animatet collapse ist not going

10-31-2009, 09:11 PM
Well then, don't do that.

If you want more help please post a link to the page on your site that shows the problem.