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 7517075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:19:57+00:00 2026-05-30T01:19:57+00:00

A little new to JQuery, I’m trying to have multiple links that open different

  • 0

A little new to JQuery, I’m trying to have multiple links that open different related content into the same container.

JSFiddle

  • 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-05-30T01:19:58+00:00Added an answer on May 30, 2026 at 1:19 am

    You can use data-* synatx of HTML5 to do it:

    HTML:

    <a class="link" data-link="first" href="#">link 1</a>
    <a class="link" data-link="second" href="#">link 2</a>
    <a class="link" data-link="third" href="#">link 3</a>
    
    <div class="linkdetails" data-link="first" >content 1</div>
    <div class="linkdetails" data-link="second" >content 2</div>
    <div class="linkdetails" data-link="third" >content 3</div>
    ​
    

    Javascript:

    $('.link').toggle(function() {
        $('.linkdetails[data-link=' + $(this).data('link') + ']').animate({
            width: '200px'
        }, 300);
    
    
    }, function() {
        $('.linkdetails[data-link=' + $(this).data('link') +']').animate({
            width: '0px'
        }, 300);
    
    });​
    

    JSFiddle DEMO

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

Sidebar

Related Questions

I'm rather new to jQuery and I'm trying to make a cool little menu
I have written a little JQuery / Javascript add on for our form, that
I have a problem using multiple (2) jQuery plugins. I've googled a little but
I have made a little Jquery after thinking a lot (as I'm new to
Using JQuery, and still a little new to it, trying to change an Link
I'm a little confused about all the different ways to create a new jQuery
am new to Json so a little green. I have a Rest Based Service
I'm new around here and i have a little problems with a C# application.
I'am new to Python 3 and could really use a little help. I have
I'm new to JQuery and don't have a huge background in Javascript, either -

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.