Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:40:00+00:00 2026-06-12T19:40:00+00:00

Ok this is my issue if anyone can help, please. I have a href

  • 0

Ok this is my issue if anyone can help, please.

I have a href that div id to switch content – I would like to add another document ready function javascript without conflicting with make tab I have already.

Example of make tab already:

<script type="text/javascript">
{literal}
$(document).ready(function(){
    function makeTabs(selector) {
        var tabContainers = $(selector + ' > div');
        tabContainers.removeClass("selected").filter(':first').addClass("selected");

        galleryRendered = false;
        $(selector + ' > ul a').click(function () {
            tabContainers.removeClass("selected");
            tabContainers.filter(this.hash).addClass("selected");
            $(selector + ' > ul a').removeClass('selected');
            $(this).addClass('selected');

            if (this.hash == '#Pictures' && !galleryRendered)
            {
                var galleries = $('.pictures > .ad-gallery').adGallery({
                    effect : 'slide-hori',
                    enable_keyboard_move : true,
                    cycle : true,
                    animation_speed : 400,
                    slideshow: {
                        enable: false
                    },
                    callbacks: {
                        init: function() {
                            this.preloadImage(0);
                            this.preloadImage(1);
                            this.preloadImage(2);
                        }
                    }
                });
                galleryRendered = true;
            }
            if (this.hash == '#OnTheMap') document.getElementById("Map").map.onContainerChanged();

            return false;
        }).filter(':first').click();
    }
    makeTabs('.tabs');
});
{/literal}
</script>

Want to create a second one so I can create tabs inside of an existing div id area/content to switch from photo to video to youtube.

<div class=".tabs"><ul><li><a href="#photo">[[Photo]]</a></li><li><a href="#tube">[[Youtube]]</a></li><li><a href="#vid">[[Video]]</a></li></ul><div id="photo">Test</div><div id="tube">Test</div><div id="vid">Test</div></div>

This will be inside a div id that already exist that uses the first tab creator shown above.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:40:01+00:00Added an answer on June 12, 2026 at 7:40 pm

    In jQuery you just have to do this:

    $(function(){
      // code here
    });
    
    $(function(){
      // more code here
    });
    

    Every function declared like this will be executed on domready.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can anyone help me with this issue? i tried it but the frame of
Can anyone recreate this issue? It seems to me like a quite serious bug
recently got an issue when loading vs 2008, it displays this... can anyone tell
Has anyone else had this issue and found a working solution? I've enabled the
Has anyone come across this issue before?
Has anyone experienced this issue - Blackberry stops responding to javaloader -usb after a
Has anyone ever run into this issue before? Sometimes the string displays, sometimes half
Has anyone ever heard of overriding too many classes in Java? Perhaps this issue
I am curious to see if anyone else has run into this same issue...
Let me know if anyone know what is the issue with this code. Basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.