Results 1 to 2 of 2

Thread: [DHTML] Collapsable Div with limit and groups

  1. #1
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default [DHTML] Collapsable Div with limit and groups

    1) CODE TITLE: Collapsable Div with limit and groups

    2) AUTHOR NAME/NOTES: Master script maker (based on my other div script)

    1. First download div.js and add this to the head of your code:
    Code:
    <script type="text/javascript" src="div.js"></script>
    2. For Groups:
    a. Add this in your body:
    Code:
    <script  type="text/javascript">
    var limit1 = new limit(# of divs allowed open at a time in group 1);
    var limit2 = new limit(# of divs allowed open at a time in group 2);
    <script>
    and change the "limit1" and "limit2" to whatever you want to call them. You can have more then just the 2.
    b. If you want to open a div in group 1 use:
    HTML Code:
    <a href="#" onClick="limit1.change(div id)"></a>
    for group two, ect. just change the first part of the onclick. (limit1)
    You MUST have the ".change()" after the name of the limit.

    3. For just the whole document:
    a.
    Code:
    <script type="text/javascript">
    var limit = new limit(# of divs allowed open at a time);
    </script>
    b. If you want to open a div use:
    HTML Code:
    <a href="#" onClick="limit.change(div id)"></a>
    You can change the "limit" to whatever you want.
    You MUST have the ".change()" after the name of the limit.

    4) DESCRIPTION: A simple script that manages multiple groups of divs with independant limits(or just whole page). When a user tries to open more divs then the limit, the first div opened, is closed.

    4) URL TO CODE:
    Demo:http://masterproject.freehostia.com/div/divs.html
    Script:http://masterproject.freehostia.com/div/div.js

    or, ATTACHED BELOW (see #3 in guidelines below):
    Last edited by Master_script_maker; 12-27-2007 at 01:19 AM.
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Again, good. You should simply merge the other one and this into one submission, with optional groups.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •