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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:38:23+00:00 2026-05-23T18:38:23+00:00

My toggle control is working, but I would like to add a plus-minus button:

  • 0

My toggle control is working, but I would like to add a plus-minus button: when content appears it becomes “-” and when content is hidden it changes to “+”. Can you help please?

 <div class='toggle'>
    <h2>Read More</h2>
    <div class="togglebox">
      <div class="content">
        <h3>   
           <p>
              A new exciting way to broadcast your business to customers     
              A new exciting way to broadcast your business.Lorem ipsum 
           </p>
        </h3>
        <!--Content Here-->
      </div>
    </div>
 </div>

 <script>
   $(document).ready(function(){
       //Hide the tooglebox when page load
       $(".togglebox").hide();
        //slide up and down when click over heading 2
       $("h2").click(function(){
           // slide toggle effect set to slow you can set it to fast too.
           $(this).next(".togglebox").slideToggle("slow");
           return true;
       });
   });
 </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-05-23T18:38:25+00:00Added an answer on May 23, 2026 at 6:38 pm

    I have modified your script. You can try this

    <script>
    $(document).ready(function(){
    //Hide the tooglebox when page load
    $(".togglebox").hide();
    //slide up and down when click over heading 2
    $("h2").click(function(){
    // slide toggle effect set to slow you can set it to fast too.
    var x = $(this).next(".togglebox").css("display");  
    if(x=="block")
    $(this).text("+ Read More");
    else
    $(this).text("- Read More");
    $(this).next(".togglebox").slideToggle("slow");
    return true;
    });
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to add button to my personal app. like google maps has at
I want to change the icon of the expander control's toggle button icon to
I want to toggle the opacity of a control (Button, TextBox, Panel, etc) in
$(function() { var jw; jw = Player; return $('.btn-control:not(.add-btn)').toggle(function() { var mnetInfo; mnetInfo =
I have a PyQt4.9 window where I would like to toggle the translucency on
By default the expander has a left aligned toggle button but in my WPF
The script fires Toggle fine on each Control 's ( Controls[i] ) Click .
I have a ListBox control that I want to change into having a toggle
In the following code, if Control (the element that trigers Toggle 's first OL
I'm trying to have a button on the self.navigationItem.rightButton that toggles a segmented control

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.