By m.e. on
Has the syntax for using misc/collapse.js on a Drupal page changed D6 > D7? I can no longer get this feature to work. I've tried both adding and omitting the drupal_add_js('misc/collapse.js') statement, as well as switching to the default Bartik theme both with and without the add_js statement.
My legends do appear, but they are not clickable. Syntax I'm using:
<fieldset class="collapsible collapsed"><legend>Click to expand</legend>Some text here.</fieldset>
I've also tried enclosing "Some text here" in a div: <div class="fieldset-wrapper">.
Any help would be appreciated.
Comments
nothing?
Anyone know?
Solution found
After much reading and experimenting I learned that in D7 collapsible fieldsets need a different "add" statement:
Posting here in case anyone else had this problem.
If its custom code in a
If its custom code in a module then you can define it using field api