Results 1 to 9 of 9

Thread: Trying to use same tab content scripts on same page

  1. #1
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Trying to use same tab content scripts on same page

    Trying to use same tab content scripts

    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    on same page more than 3 times but with diffrent shade.gif and shadeactive.gif ....

    How can i do this with a minimum code...

    I need to change only these two values:

    .shadetabs li a{
    background: white url(images/shade.gif) top left repeat-x;
    }

    .shadetabs li a.selected{ /*selected main tab style */
    background-image: url("images/shadeactive.gif");
    border-bottom-color: white;
    }

    How can i do this???

    Thank you for your help...

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    1) change the name of the classes

    Code:
    .shadetabs2 li a{
    background: white url(images/shade.gif) top left repeat-x;
    }
    
    .shadetabs2 li a.selected{ /*selected main tab style */
    background-image: url("images/shadeactive.gif");
    border-bottom-color: white;
    }
    and now refer to these new class names within your html. so you'll have 3 codies of the same coding essentially, with different color schemes.


    2) Use multiple classes

    Code:
    .shadetabs li a{
    background: white url(images/shade.gif) top left repeat-x;
    }
    
    .shadetabs li a.selected{ /*selected main tab style */
    background-image: url("images/shadeactive.gif");
    border-bottom-color: white;
    
    .tab2 a { backround:url(inactiveimage.2) }
    .tab2 a.selected { bacgkround:url(active.2) }
    .tab3 a { background:url(inactiveimage.3) }
    .tab3 a.selected { background:url(active.3) }
    }
    Now, in the corrsepoding element, add:

    Code:
    <class='shadetabs tab2'>

  3. #3
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I could not get the second one (number 2) but first one (number 1) works like a charm....

    Thank you for your help....

    You rock man...

  4. #4
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello,
    I have another question, I start using same tab content js file and css file for three diffrent paleces on my page, but whenever i go to next or previous page and when i come back to same page content goes back to first tab.... Even i click a link on the 5th tab but the script takes me to the first tab when i come back...

    Is there anything that i can do to get rid of this?

    Thanks

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

    Default

    Have you enabled persistence in the script? Please post a link to the page on your site that contains the problematic script so we can check it out.

  6. #6
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you are talking about this:

    this.enabletabpersistence=true

    Yes i did...

    Thank you
    Last edited by media; 01-12-2008 at 03:58 AM.

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

    Default

    Hi:
    Are you saying the tabs themselves reset to the first tab when you navigate to another page then back? In other words, the persistence feature isn't working? It seems to be for me, at least in FF2.x.

    BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm

  8. #8
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am sorry i did not even realize that, I reinstated the credit...


    Anyway, i am on the ie and it is not working at all...

    What should i do to deal with this and correct the problem?

    Thanks for your help...

    Quote Originally Posted by ddadmin View Post
    Hi:
    Are you saying the tabs themselves reset to the first tab when you navigate to another page then back?
    Yes but it is not working at all...

    Please help...
    Last edited by media; 01-12-2008 at 02:28 AM.

  9. #9
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I did some testing and see that firefox is working but my ie is not working but at the same time my lap top has same version ie and it is working on that one...

    This is so weird...
    Last edited by media; 01-16-2008 at 10:24 PM.

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
  •