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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:32:18+00:00 2026-05-15T14:32:18+00:00

I am working on a band blurb page, example here. The idea is to

  • 0

I am working on a band blurb page, example here.

The idea is to click on a photo which will display the band member blurb on the left, overlaying the overall band description.

My issue with the current code is that using toggle to display the alternative individual blurbs means that when you click between the different members, sometimes the toggle state resets and it seems like nothing is happening. Each time you click a photo, that persons bio should display. Only when you click the same one twice, or a ‘return to band bio’ button (not yet on the page) should the main bio display.

My current code is below:

jQuery(document).ready(function($) {

$('#gotoben').toggle(function() {
    $('li.gotoben').fadeTo("slow", 1);
    $("#dan").hide();
    $("#ben").show();
    $('li.gotoben').siblings().fadeTo("slow", 0.3);
},
  function () {
    $('li.gotoben').fadeTo("slow", 1);
    $('li.gotoben').siblings().fadeTo("slow", 1);
    $("#ben, #dan").hide();
}); 

$('#gotodan').toggle(function() {
    $('li.gotodan').fadeTo("slow", 1);      
    $("#ben").hide();
    $("#dan").show();
    $('li.gotodan').siblings().fadeTo("slow", 0.3);
},
  function () {
    $('li.gotodan').fadeTo("slow", 1);  
    $('li.gotodan').siblings().fadeTo("slow", 1);
    $("#dan, #ben").hide();
}); 

});

I have tried using the .click function but also cannot make everything work 100% smoothly.

Can anyone help me make this work?

EDIT – WORKING CODE

The only thing added here to patricks code is the inclusion of the jQuery stop function.

    jQuery(document).ready(function($) {

    $('.bigLeft div:gt(0)').hide();

    $('ol.band li').click(function() {
        var $th = $(this);

            // Hide the current profiles
        $(".bigLeft").children().hide();

        if( $th.hasClass('selected') ) {
            $th.stop(true, false).siblings().fadeTo("slow", 1);
            $th.removeClass('selected');
            $('#theBand').show(); // <-- change the ID to the default
        } else {
            $th.addClass('selected');

              // Grab the ID of the one that was clicked
            var id = $th.attr('id');

              // Fade in the current, and fade the siblings
            $th.stop(true, false).fadeTo("slow", 1)
                   .siblings().removeClass('selected').stop(true, false).fadeTo("slow", 0.3);

              // Show the clicked profile by concatenating the ID clicked with '_profile'
            $("#" + id + "_profile").show();
        }
    }); 

});
  • 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-15T14:32:18+00:00Added an answer on May 15, 2026 at 2:32 pm

    I would tend to take a little different approach.

    Give each li under ol.bind the ID #ben, #dan, etc.

    Then give each profile a similar ID #ben_profile, #dan_profile, etc.

    Then use that consistency to your advantage:

    $('ol.band li').click(function() {
        var $th = $(this);
    
            // Hide the current profiles
        $(".bigLeft").children().hide();
    
        if( $th.hasClass('selected') ) {
            $th.siblings().fadeTo("slow", 1);
            $th.removeClass('selected');
            $('#defaultProfile').show(); // <-- change the ID to the default
        } else {
            $th.addClass('selected');
    
              // Grab the ID of the one that was clicked
            var id = $th.attr('id');
    
              // Fade in the current, and fade the siblings
            $th.fadeTo("slow", 1)
                   .siblings().removeClass('selected').fadeTo("slow", 0.3);
    
              // Show the clicked profile by concatenating the ID clicked with '_profile'
            $("#" + id + "_profile").show();
        }
    }); 
    

    You can try it out here: http://jsfiddle.net/kDqsT/

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

Sidebar

Related Questions

I'm working on an attendance entry form for a band. My idea is to
Working with python interactively, it's sometimes necessary to display a result which is some
I'm working on an app for a band, which consists of several different activities
i have created an IE band object (toolbar) that is working well. however, when
Working on a somewhat complex page for configuring customers at work. The setup is
I'm working on a jpa project where I persist multiple instances of a Band
I'm working with client who provided me with somewhat vague instructions. Here's what I'm
I'm using YQL to try and find band photos for a project I'm working
I'm working at the moment on a new project which has following requirement: Several
I am working on a project which used this plugin . I really can't

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.