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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:23:05+00:00 2026-05-25T01:23:05+00:00

I’m very familiar with HTML and CSS, but new to Javascript and jQuery. I

  • 0

I’m very familiar with HTML and CSS, but new to Javascript and jQuery. I am trying to figure out how to have multiple jQuery effects occur with one event (.click).

I have a DIV (.bio-description) that has a lot of text. I have made the .bio-description DIV height only 50px and set the overflow to hidden. When someone CLICKS the .bio-readmore DIV, I would like the following to happen: 1).bio-description DIV’s height is set to ‘auto’ (so all the text is now visible), 2) .bio-readmore DIV disappears, and 3) .bio-readless DIV appears.

I have read quite a bit on jQuery.com and done a lot of searching around on Google. I have probably come across the answer already, but just haven’t understood how to implement it.

Below is the code I have so far. The .bio-readmore does hide when clicked, but the other two actions don’t occur. I have also tried different effects other than .height, like .css, .addClass, and .animate. However, nothing works and I figure it must have something to do with how I am trying to handle multiple effects with one event.

Thank you for any help you can offer!

-Mark

<script>
$(document).ready(function(){

    $(".bio-readmore").click(function() {
            $(".bio-description").height("auto");
        }, function () {
            $(".bio-readmore").hide();
        }, function () {
            $(".bio-readless").show();
        });

});

</script>

<style type="text/css">

#wrapper {width:600px; margin:0 auto;}

.bio-description {background:#CCCCCC; padding:10px; height:50px; overflow:hidden;}

.bio-readmore {float:right; margin-right:40px; background:#66CC66; padding:3px;}

.bio-readless {display:none; float:right; margin-right:40px; background:#FF3333; padding:3px;}

</style>


</head>

<body>

    <div id="wrapper">

        <div class="bio-description">

            <p>Morbi ut tincidunt magna. Ut justo eros, gravida a interdum eget, molestie eget nibh. Morbi sed mauris lectus, id tincidunt lectus. Sed gravida consectetur enim sit amet sodales. Proin ligula metus, lobortis nec commodo rutrum, tincidunt sit amet turpis. Nullam condimentum urna nec libero fermentum non tristique dolor pulvinar. Cras tortor nisi, convallis a laoreet sit amet, bibendum sed nunc. Cras quam enim, mollis non hendrerit sit amet, ullamcorper quis libero.</p>

        </div>

        <div class="bio-readmore">Read More &#9660;</div>

        <div class="bio-readless">Read Less &#9650;</div>

    </div>

</body>
  • 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-25T01:23:06+00:00Added an answer on May 25, 2026 at 1:23 am

    You can run an entire function on a click event (multiple lines):

    $(".bio-readmore").click(function() {
                $(".bio-description").height("auto");
                $(".bio-readmore").hide();
                $(".bio-readless").show();
            });
    

    aaaaaaand you’re done! I love JQuery.

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to loop through a bunch of documents I have to put
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I have just tried to save a simple *.rtf file with some websites and

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.