CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Collapsible div
Pages: [1]

Author Topic: Collapsible div  (Read 2403 times)

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Collapsible div
January 06, 2010, 07:49:39 pm
I recently figured out that I can do the following to make a collapsible section of a page:

Code: [Select]
<script type="text/javascript" src="/misc/jquery.js"></script>
<script type="text/javascript" src="/misc/drupal.js"></script>
<script type="text/javascript" src="/misc/collapse.js"></script>

<fieldset class="collapsible collapsed">
<legend>My div:</legend>
<div>
<table>
<tr><td colspan="2" align="center">blah blah</td></tr>
<tr><td>blah</td><td>blah</td></tr>
</table>
</div>
</fieldset>

Some brittle points: I must turn off link-recognition and automatic line-breaking in the input format (which is kind of a bummer), and I must have the 3 javascript includes in exactly the above order, or else the JS breaks.

I thought i'd post it here for posterity, and also to see whether anyone had suggestions for improvement.

I'm using Drupal 6.13.

Thanks,

 -Ken

kenahoo

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5.3.16
Re: Collapsible div
January 17, 2010, 08:36:30 am
Apparently if I change this:

Code: [Select]
<fieldset class="collapsible collapsed">
<legend>My div:</legend>
<div>
...
</div>
</fieldset>

to this:

Code: [Select]
<fieldset class="collapsible collapsed"><legend>My div:</legend><div>
...
</div></fieldset>

then I can use an input format for this content where lines and paragraphs break automatically and links are auto-recognized.

 -Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Collapsible div

This forum was archived on 2017-11-26.