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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:21:20+00:00 2026-05-13T15:21:20+00:00

As usual, I want to do more than I know how to do yet

  • 0

As usual, I want to do more than I know how to do yet 😀

Here’s what I’m working on…I’m writing up a Bio.

But within the bio, I want a “long bio” and a “short bio” button.

The long bio will obviously display the whole bio, but the short bio would grab elements in the list and make them bold and contract the div to now only contain those list elements.

I know it soulds tricky (and may be a little too ‘flashy’) but I’m hoping to do it in a classy way.

I can accomplish a lot of what I want to do with the animatedcollapse script, but not exactly because that would just hide the big list and make a separate div of the small list visible.

Here’ what I’m trying to accomplish:

<div id="bioWrap">
<h2>Bio</h2>
<p>Below is the bio you can read...<a href="" onclick="toggle The Long Bio And make the long bio and short bio buttons visable">read more</a></p>
<div id="bioTrigger">
<input type="button value="long"><input type="button value="short">
<ul>
<li> This would be text within the long bio</li>
<li> This would be text within the long bio</li>
<li id="This would remain in the li when short button is clicked"> This would be text within the long bio</li>
<li> This would be text within the long bio</li>
<li id="This would remain in the li when short button is clicked"> This would be text within the long bio</li>
<li> This would be text within the long bio</li>
</ul>
</div>
</div>

I do have jquery on this project if that helps…

  • 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-13T15:21:20+00:00Added an answer on May 13, 2026 at 3:21 pm

    First thing I’m noticing here is you’re using IDs for the list items; it would probably be better to use a class there. Anyway, here’s something I put together quickly. It’s not tested, but I’ll test it right after I post this answer. Edit: It’s tested now. (and it works)

    $(function() {
        $("#toggle_bio").click(function() {
            $(this).toggleClass("collapsed");
            $("#bio li:not(.remain)").toggle("slow");
            return false;
        });
    });
    

    This is an example of how you’d format the list:

    <ul id="bio">
        <li>Nunc tempus mi non enim viverra tristique non pellentesque elit.</li>
        <li class="remain">Donec molestie rhoncus urna, ac vehicula risus malesuada nec.</li>
        <li>Vivamus vel mauris mi, tincidunt gravida nisi.</li>
        <li class="remain">Pellentesque sit amet metus ac nisi vulputate commodo dignissim quis dolor.</li>
        <li>Cras aliquam urna ultricies neque fermentum laoreet.</li>
        <li>Phasellus nec magna id lacus condimentum accumsan sollicitudin eget orci.</li>
    </ul>
    

    …and this is how you could add the toggle button:

    <a id="toggle_bio" href="#">Toggle bio</a>
    

    And finally, if you want to bold the ones that don’t go away, you can use this CSS:

    .remain {
        font-weight:bold;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make preview button as usual form button next to submit button(as
This is more a theoretical question than a practical one, but given I undestand
I've been fooling around with OpenCV and want to continue working with it, but
I want to invoke a selector of a method that has the usual NSError**
I want to comment several lines in my .vimrc, the usual way I do
I'm currently writing some general purpose .net libraries that contain usual helper classes. For
I want nice operators for complex arithmetic to make my code more readable. Ocaml
(note: I'm usually more thorough in doing my research before asking a question here,
My usual workflow when working with git, is something like this: create a local
This is more of a general question rather than a specific problem. I'm coding

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.