Tagged: jquery accordion with plus minus

BOOTSTRAP ACCORDION WITH PLUS MINUS ICON 0

BOOTSTRAP ACCORDION WITH PLUS MINUS ICON EXAMPLES

Today, We want to share with you BOOTSTRAP ACCORDION WITH PLUS MINUS ICON EXAMPLES.In this post we will show you Simple Bootstrap accordion with toggle button, hear for Bootstrap expand / collapse with plus and minus we will give you demo and example for implement.In this post, we will learn about add plus minus symbol to a bootstrap accordion with an example.

BOOTSTRAP ACCORDION WITH PLUS MINUS ICON EXAMPLES

There are the Following The simple About BOOTSTRAP ACCORDION WITH PLUS MINUS ICON EXAMPLES Full Information With Example and source code.

As I will cover this Post with live Working example to develop bootstrap 4 accordion with plus minus icon, so the add plus minus symbol to a bootstrap accordion for this example is following below.

Example 1: Bootstrap expand / collapse with plus and minus

Step 1 : HTML Part

<div class="container ">
 
    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
 
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="groupOne">
                <h4 class="panel-title">
                    <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                        <i class="plus-minus glyphicon glyphicon-plus"></i>
                        Product Group Item #1
                    </a>
                </h4>
            </div>
            <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="groupOne">
                <div class="panel-body">
                     
                </div>
            </div>
        </div>
 
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingTwo">
                <h4 class="panel-title">
                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                        <i class="plus-minus glyphicon glyphicon-plus"></i>
                        Product Group Item #2
                    </a>
                </h4>
            </div>
            <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                <div class="panel-body">
                     
                </div>
            </div>
        </div>
 
    </div><!-- panel-group -->
      
</div><!-- container -->

Step 2 : javascript Part

$(function() {
  function toggleIcon(e) {
      $(e.target)
          .prev('.panel-heading')
          .find(".plus-minus")
          .toggleClass('glyphicon-plus glyphicon-minus');
  }
  $('.panel-group').on('hidden.bs.collapse', toggleIcon);
  $('.panel-group').on('shown.bs.collapse', toggleIcon);
 
});

Full Example of the Expand Collapse Div Plus Minus Using jQuery

Example 2: jQuery Accordion with Plus and Minus Toggle

Step 1: HTML Part

<div class="accordion_container">
  <div class="accordion_head">First Accordian Head<span class="plusminus">+</span></div>
  <div class="accordion_body" style="display: none;">
    <p>First Accordian Body, it will have description</p>
  </div>
  <div class="accordion_head">Second Accordian Head<span class="plusminus">+</span></div>
  <div class="accordion_body" style="display: none;">
    <p>Second Accordian Body, it will have description</p>
  </div>
  <div class="accordion_head">Third Accordian Head<span class="plusminus">+</span></div>
  <div class="accordion_body" style="display: none;">
    <p>Third Accordian Body, it will have description</p>
  </div>
</div>

<div class="accordion_container">
  <div class="accordion_head">First Accordian Head<span class="plusminus">+</span></div>
  <div class="accordion_body" style="display: none;">
    <p>First Accordian Body, it will have description</p>
  </div>
  <div class="accordion_head">Second Accordian Head<span class="plusminus">+</span></div>
  <div class="accordion_body" style="display: none;">
    <p>Second Accordian Body, it will have description</p>
  </div>
  <div class="accordion_head">Third Accordian Head<span class="plusminus">+</span></div>
  <div class="accordion_body" style="display: none;">
    <p>Third Accordian Body, it will have description</p>
  </div>
</div>

Step 2: jQuery Part

$(document).ready(function() {
  //toggle the component with class accordion_body
  $(".accordion_head").click(function() {
    if ($('.accordion_body').is(':visible')) {
      $(".accordion_body").slideUp(300);
      $(".plusminus").text('+');
    }
    if ($(this).next(".accordion_body").is(':visible')) {
      $(this).next(".accordion_body").slideUp(300);
      $(this).children(".plusminus").text('+');
    } else {
      $(this).next(".accordion_body").slideDown(300);
      $(this).children(".plusminus").text('-');
    }
  });
});

Step 3: CSS Part

.accordion_container {
  width: 500px;
}

.accordion_head {
  background-color: skyblue;
  color: white;
  cursor: pointer;
  font-family: arial;
  font-size: 14px;
  margin: 0 0 1px 0;
  padding: 7px 11px;
  font-weight: bold;
}

.accordion_body {
  background: lightgray;
}

.accordion_body p {
  padding: 18px 5px;
  margin: 0px;
}

.plusminus {
  float: right;
}

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about BOOTSTRAP ACCORDION WITH PLUS MINUS ICON EXAMPLES.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Bootstrap collapse plus minus sign Examples 0

Bootstrap collapse plus minus sign

Today, We want to share with you Bootstrap collapse plus minus sign.In this post we will show you bootstrap accordion with plus minus, hear for Accordion with plus minus icon toggle pure css we will give you demo and example for implement.In this post, we will learn about add plus minus symbol to a bootstrap accordion with an example.

Bootstrap collapse plus minus sign

There are the Following The simple About Bootstrap collapse plus minus sign Full Information With Example and source code.

As I will cover this Post with live Working example to develop bootstrap collapse panel with icon example, so the jquery accordion with plus minus for this example is following below.

create bootstrap accordion with plus minus icons

create index.html file and add Copy and paste this source code: Toggle Bootstrap Accordion With Plus Minus Icons on Header Link Click Example

<body>
    
<div class="bs-example">
    <h2>Bootstrap accordion with plus minus icons</h2>
    <div class="panel-group" id="accordion">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"><span class="glyphicon glyphicon-plus"></span> PHP Tutorials with Example</a>
                </h4>
            </div>
            <div id="collapseOne" class="panel-collapse collapse">
                <div class="panel-body">
                    <p>PHP Step By Step Full Example, Demo with Tutorils. <a href="https://pakainfo.com/jobs/technology/programming/php/" target="_blank">Learn more.</a></p>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"><span class="glyphicon glyphicon-plus"></span> Laravel Tutorials with Example</a>
                </h4>
            </div>
            <div id="collapseTwo" class="panel-collapse collapse in">
                <div class="panel-body">
                    <p>Laravel Server side Step By Step Full Example, Demo with Tutorils. <a href="https://pakainfo.com/jobs/technology/laravel/" target="_blank">Learn more.</a></p>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree"><span class="glyphicon glyphicon-plus"></span> Angularjs Tutorials with Example</a>
                </h4>
            </div>
            <div id="collapseThree" class="panel-collapse collapse">
                <div class="panel-body">
                    <p>An Angularjs Step By Step Full Example, Demo with Tutorils. <a href="https://pakainfo.com/jobs/technology/angularjs/" target="_blank">Learn more.</a></p>
                </div>
            </div>
        </div>
    </div>
    <p><strong>Note:</strong> Click on the Any linked heading menu text to expand or collapse accordion panels using CSS.</p>
</div>
</body>

Include CDN libs

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

style.css

    .bs-example{
        margin: 20px;
    }
    .panel-title .glyphicon{
        font-size: 14px;
    }

main.js

<script>
    $(document).ready(function(){
        $(".collapse.in").each(function(){
            $(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus");
        });
        $(".collapse").on('show.bs.collapse', function(){
            $(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus");
        }).on('hide.bs.collapse', function(){
            $(this).parent().find(".glyphicon").removeClass("glyphicon-minus").addClass("glyphicon-plus");
        });
    });
</script>

Full example Source Code:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>create bootstrap accordion with plus minus icons</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style type="text/css">
    .bs-example{
        margin: 20px;
    }
    .panel-title .glyphicon{
        font-size: 14px;
    }
</style>
<script>
    $(document).ready(function(){
        $(".collapse.in").each(function(){
            $(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus");
        });
        $(".collapse").on('show.bs.collapse', function(){
            $(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus");
        }).on('hide.bs.collapse', function(){
            $(this).parent().find(".glyphicon").removeClass("glyphicon-minus").addClass("glyphicon-plus");
        });
    });
</script>
</head>
<body>
    
<div class="bs-example">
    <h2>Bootstrap accordion with plus minus icons</h2>
    <div class="panel-group" id="accordion">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"><span class="glyphicon glyphicon-plus"></span> PHP Tutorials with Example</a>
                </h4>
            </div>
            <div id="collapseOne" class="panel-collapse collapse">
                <div class="panel-body">
                    <p>PHP Step By Step Full Example, Demo with Tutorils. <a href="https://pakainfo.com/jobs/technology/programming/php/" target="_blank">Learn more.</a></p>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"><span class="glyphicon glyphicon-plus"></span> Laravel Tutorials with Example</a>
                </h4>
            </div>
            <div id="collapseTwo" class="panel-collapse collapse in">
                <div class="panel-body">
                    <p>Laravel Server side Step By Step Full Example, Demo with Tutorils. <a href="https://pakainfo.com/jobs/technology/laravel/" target="_blank">Learn more.</a></p>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree"><span class="glyphicon glyphicon-plus"></span> Angularjs Tutorials with Example</a>
                </h4>
            </div>
            <div id="collapseThree" class="panel-collapse collapse">
                <div class="panel-body">
                    <p>An Angularjs Step By Step Full Example, Demo with Tutorils. <a href="https://pakainfo.com/jobs/technology/angularjs/" target="_blank">Learn more.</a></p>
                </div>
            </div>
        </div>
    </div>
    <p><strong>Note:</strong> Click on the Any linked heading menu text to expand or collapse accordion panels using CSS.</p>
</div>
</body>
</html>                                                                                                  

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Bootstrap collapse plus minus sign.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Expand Collapse Div Plus Minus Using jQuery 0

Expand Collapse Div Plus Minus Using jQuery

Expand Collapse Div Plus Minus Using jQuery

Today, We want to share with you Expand Collapse Div Plus Minus Using jQuery.
In this post we will show you Expand Collapse Div Plus Minus Using jQuery, hear for Expand Collapse Div Plus Minus Using jQuery we will give you demo and example for implement.
In this post, we will learn about Expand Collapse Div Plus Minus Using jQuery with an example.

Collapsibles allow and used yo you to hide data-content or show data-content, which is useful information for storing parts of information.In this POST,Expand-Collapse Div Plus-Minus Using jQuery-Example

Collapsible data-content all areas or div area are frequently presented in web sites or web-apps and applications as a way to let users friendly to control how content is shown content or hidden data-content on the page.

View Demo

Collapse Methods

Expand content and collapse content for small script in jquery not need to add any js library for expand data-content and collapse data-content functionality

  • .collapse(options)
  • .collapse(“toggle”)
  • .collapse(“show”)
  • .collapse(“hide”)

View Demo

jQuery Expand Collapse div – Full Example

The expand collapse jquery functions are used for expanding data-content or collapsing menu structured or tree view structured list of items.



<title>expand and collapse div using jquery example</title>
  
  
  



<div class="container">
  <h2>ng4free Panel</h2>
  <h4>expand and collapse div using jquery example - by ng4free.com</h4>
  <p>Click on the First example of collapsible panel to open panel and close panel it.</p>
  <div class="panel-group">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a href="#ng4free1">Collapsible panel</a>
        </h4>
      </div>
      <div id="ng4free1" class="panel-collapse collapse">
        <div class="panel-body">
		<p>
			<ul>
				<li>expand collapse bootstrap</li>
				<li>expand and collapse div using css</li>
				<li>expand and collapse in html</li>
				<li>jquery expand collapse div plus minus</li>
				<li>accordion jquery</li>
				<li>jquery expand collapse div demo</li>
				<li>javascript expand collapse div example</li>
				<li>jquery expand collapse div image</li>
				<li>expand and collapse div using jquery example</li>
				<li>expand and collapse demo</li>
				<li>expand collapse jquery</li>
				<li>expand and collapse in html</li>
				<li>how to remove expand collapse</li>
				<li>remove expand collapse</li>
			</ul>
		</p>
		</div>
        <div class="panel-footer"><a href="https://pakainfo.com/" title="jquery expand collapse div plus minus">Top 10</a></div>
      </div>
    </div>
  </div>
</div>
    


Jquery Expand Collapse Simple Example Demo HERE

View Demo

We hope you get an idea about Expand Collapse Div Plus Minus Using jQuery
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.