Results 1 to 4 of 4

Thread: Tab content target 2 different boxes

  1. #1
    Join Date
    Apr 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Tab content target 2 different boxes

    1) Script Title: Tab Content Script (v 2.2) - Demo 2

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tabcontent.htm

    3) Describe problem: I'm working with the code in Demo 2 - and what I want to try to do is as follows:

    My Reference Link: http://www.groupjdesign.com/tabs3.html

    When you click on tabs Home, Giving Programs, Leave A Legacy or Make a Gift, I want the content of them to appear in the green box that is below the tabs, but when you click on the tabs to the right - Events, Home, Home, I want their content to appear in the box that is below those tabs - while keeping the content in the box to the left consistent with whatever the information from the last tab that was clicked from that side.

    Thanks so much in advance!!
    Last edited by sjbohlman; 08-15-2008 at 02:48 PM. Reason: Added Link

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well, firstly, this script supports multiple instances of Tabs Content script on the same page, so you should remove the duplicate tabcontent2.js reference in the head section of your page. Then, from what I understand what you're trying to do, you'd simply define two separate instances of Tabs Content script, one for each of the left and right instances.

    Now, regarding this part, you'll have to elaborate what you mean:

    while keeping the content in the box to the left consistent with whatever the information from the last tab that was clicked from that side.
    DD Admin

  3. #3
    Join Date
    Apr 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks!

    Where would I go to define the two separate instances of Tab Content? Is that in the CSS code, or the js code?

    What I meant by
    while keeping the content in the box to the left consistent with whatever the information from the last tab that was clicked from that side.
    Is - (when you click on a link on the left, and the information comes up in the left box), when you click something on the right, and information comes up in the right box - the information that was up from the link in the left box, stays there, and does not go away when a link on the right is clicked.

    Thanks again for your help!

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Actually, the sample HTML code you cut and paste (Step 2 on the script page) by default contains 3 separate instances of Tab Content script, so simply follow the convention laid out there. Mainly, variable names for each instance when initializing them must be unique:

    Code:
    var countries=new ddtabcontent("countrytabs")
    DD Admin

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
  •