JavaScript How can I add minus/plus icons to bootstrap collpase panels minus plus icons,plus minus icons css,plus minus icons.

So I am using bootstrap and have collapse panels I wish to implement plus and minus icons.

I have currently done it using the code below found on stackoverflow, i can't remember the link so will edit later. It uses the code below however I have to duplicate it for each group of collapse panels as they have a unique id. Is there a way to it so it's only required once and will work on multiple on the same page?

jQuery(function ($) {
  var $active = $('#accordionthree .panel-collapse.in').prev().addClass('active');
  $active.find('.symbol').append('<span class="glyphicon glyphicon-minus pull-left"></span>');
  $('#accordionthree .panel-heading').not($active).find('.symbol').prepend('<span class="glyphicon glyphicon-plus pull-left"></span>');
  $('#accordionthree').on('show.bs.collapse', function (e)
  {
    $('#accordionthree .panel-heading.active').removeClass('active').find('.glyphicon').toggleClass('glyphicon-plus glyphicon-minus');
    $(e.target).prev().addClass('active').find('.glyphicon').toggleClass('glyphicon-plus glyphicon-minus');
  });
  $('#accordionthree').on('hide.bs.collapse', function (e)
  {
    $(e.target).prev().removeClass('active').find('.glyphicon').removeClass('glyphicon-minus').addClass('glyphicon-plus');
  });
}); 
Answer:1

I am trying to import svg image from file into next.js component. In assets folder I have google.svg(icon): <svg className="svgIcon-use" width="25" height="37" viewBox="0 0 25 25"> <g ...

I am trying to import svg image from file into next.js component. In assets folder I have google.svg(icon): <svg className="svgIcon-use" width="25" height="37" viewBox="0 0 25 25"> <g ...

  1. import next in python
  2. import css in next js
  3. import bootstrap in next js
  4. import powerpoint into prezi next
  5. import quiz into quizzes.next

I have a video gallery with thumbnails. when I click on a thumbnail a video shows up. how can I stop/reset video that's playing when I click on another thumbnail? here is the code I have function ...

I have a video gallery with thumbnails. when I click on a thumbnail a video shows up. how can I stop/reset video that's playing when I click on another thumbnail? here is the code I have function ...

  1. stop video when modal closes
  2. videos stop on facebook
  3. stop video on spotify
  4. stop video on zoom
  5. stop video on instagram
  6. stop video on youtube
  7. video on stop bullying
  8. stop video on iframe
  9. stop videos on facebook from autoplaying
  10. stop videos on daily mail
  11. stop videos on facebook playing automatically
  12. stop video playing when modal is closed

I am trying to print array element to console using for each loop in javascript. But I am printing something which I am not able to figure out what! let arr=["1,2,3","iosajah","undefined"]; for(...

I am trying to print array element to console using for each loop in javascript. But I am printing something which I am not able to figure out what! let arr=["1,2,3","iosajah","undefined"]; for(...

  1. print array elements in java
  2. print array elements in c
  3. print array elements bash
  4. print array elements python
  5. print array elements javascript
  6. print array elements php
  7. print array elements in reverse order java
  8. print array elements in shell script
  9. print array elements perl
  10. print array elements using recursion java
  11. print array elements in reverse order c++
  12. print array elements in new line javascript
  13. print array elements in reverse order javascript
  14. print array elements in ascending order
  15. print array elements using recursion in c
  16. print array elements in one line java
  17. print array elements using pointers
  18. print array elements in scala
  19. print array elements in matlab
  20. print array elements in java 8

Assuming I have this list const foo = [ { id: 1, bar: [ {id: 1, a: null}, {id: 2, a: 224}, {id: 3, a: 345}, ] }, { id: 2, bar: [ {id: 4, a: 763}, {id: 5, a: null}, {id: 3, a: ...

Assuming I have this list const foo = [ { id: 1, bar: [ {id: 1, a: null}, {id: 2, a: 224}, {id: 3, a: 345}, ] }, { id: 2, bar: [ {id: 4, a: 763}, {id: 5, a: null}, {id: 3, a: ...

  1. list filter list
  2. list filter list java
  3. filter list by list python
  4. filter list of list java 8
  5. python filter list list comprehension
  6. filter list in list c#
  7. filter list inside list in java 8
  8. filter list with list excel
  9. filter list in list c# linq
  10. filter list in list linq
  11. filter list in list javascript
  12. filter list with list js
  13. filter list of list in r
  14. filter list with another list c#
  15. filter list by another list python
  16. filter list with another list java
  17. filter list by another list excel
  18. filter list from another list in java 8
  19. filter list with boolean list python
  20. filter list vs distribute list ospf