By jkopel on
I have been working on a page which shows a collapsible list of nodes from a view.
My client wanted a fancy javascript accordion and I found the excellent jQuery plugin from http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
All I had to do was set the list up as a DL list and it just worked!
That is it worked except in IE7.
Turns out that it needs a newer version of jQuery then what is in Drupal 5.1.
I installed jQuery 1.1.3 and it works most places except that it messes with the collapse.js that handles forms.
Has anyone figured out a work around for this, or tried upgrading jQuery?
Thanks!
Josh
Comments
jQuery compatibility plugin
You need to use the jQuery compatibility plugin at http://dev.jquery.com/browser/trunk/plugins/compat-1.0/jquery.compat-1.0...
I'm not sure how you'd go about integrating that, but as a quick fix, you can copy and paste that code into /misc/drupal.js.
Or you could put the compatibility plugin in your 'misc' directory and in your theme's page.tpl.php, you could put this code in:
looked promising, but no luck
thanks for the reply, but it does not seem to fix the issue.
i temporarily hacked common.inc and included jquery.compat-1.0.js right after it loads drupal.js, but it is still doing the same thing.
the weird thing is that it will collapse/expand ONE fieldset, but then it just quits!
i suppose i will start debugging the collapse.js and figure out where it is colliding with jQuery.
i might also just leave it alone since it won't effect that many people...
thanks anyway!
josh
You should not only include
You should not only include the compat patch, you should also replace the jquery.js that Drupal 5 shipped with by its 1.1 version! It seems to me you didn't do that. Sorry if I misinterpreted your post.
perhaps I was not clear?
I am using jQuery 1.1.3
downloaded fresh this morning ;-)
i guess my javascript skills are not quite up to the task since i am not making much headway with this
thanks for your reply
josh
Implement the jQuery Update module
I've been working on exactly the same thing. I found this thread:
http://groups.drupal.org/node/3576
Which led me to install the "jQuery Update" module, which implements a compatibility fix for the collapse.js problem. Find the jQuery Update module here:
http://drupal.org/project/jquery_update
You're not the only one running into this. By installing jQuery Update, I've gotten the same Accordion script to work (I think -- so far so good), and the existing core Drupal scripts are back working too.
thanks
thanks Vallenwood
i got the accordion to work quite well except for the collapse functions
since it is a site where most users are not authenticated (and can't edit content) it has not been an issue
I will try the "jQuery Update" module on my dev site and see what happens
josh
Try another accordion...
Hi
For what it's worth,
You could try the accordion at http://openrico.org
Click on demos, accordion.
Good luck
Also see...
This thread may also be of value:
http://drupal.org/node/119643
Pages?
Can the accordian effect be adapted for use with primary menus, or does it require a list to work?
Arp Laszlo
bricksandclicks.marketing
design / theming / development / consulting