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

  • SEARCH
  • Home
  • 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 8403753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:25:42+00:00 2026-06-09T22:25:42+00:00

I have multiple hidden divs on the page each holding different content, when I

  • 0

I have multiple hidden divs on the page each holding different content, when I click a link on the page e.g.

<a href="#contentone" class="clicky">Load content one</a>
<a href="#contenttwo" class="clicky">Load content two</a>

<div id="contentone">Some content here to be loaded into another div</div>
<div id="contenttwo">Some content here to be loaded into another div</div>

<div id="slider">
  This content to be replaced by content from links/hidden divs
</div>

Currently I’v got this setup so it loads the content from an external source, but i’d prefer it to populate the slider with content hidden on the page (As above).

My current jquery is below, would love this this to be converted to work within hidden divs on the page opposed to external files.

<script type='text/javascript'>//<![CDATA[ 
$(window).load(function(){
$(function () {
    $(".clicky").click(function () {
                var url = this.href;
                var e = $("#slider");
                e.load(url, function() {
                    e.animate({width: "show"}, 500);
                });
                return false;
    });
});
});//]]>  

</script>
  • 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-09T22:25:43+00:00Added an answer on June 9, 2026 at 10:25 pm

    You don’t need to use .load.

    $(function () {
        $(".clicky").click(function () {
            var content_id = $(this).attr('href');
            $('#slider').hide().html($(content_id).html()).show(500);
            return false;
        });
    });
    

    THE WORKING DEMO.

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

Sidebar

Related Questions

I have a page with multiple divs that hold different sections of content. Initially,
I have multiple divs setup, with headers and content. When you click the header,
I have a list where elements are hidden for multiple reasons, each corresponding to
I have multiple input text fields grouped in divs: <div class=container0> <input class=containerItem0 name=containerItem[0][0]
I have multiple toggle divs on the same page, and the div I'm toggling
I have multiple autocomplete inputs on my page. Behind the scenes, each autocomplete list
I have multiple forms in my page and depending on the hidden input value,
this is kinda tricky to explain,but here goes....I have multiple hidden divs that swap
Okay, I have a page on a Drupal install that has multiple divs. I
I have multiple options like this : <li> <a href=# title= class=selected><span class=to-admin>Administrator</span></a> <input

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.