F
F
Fredd Monty2017-03-18 13:29:22
JavaScript
Fredd Monty, 2017-03-18 13:29:22

How to hide an open block when opening a new one?

Hello,

Tell me who knows.

Bootstrap 3.
Additional information of the block opens when you click on the button.
Each block has its own accordion.
How do I close the old one when I open a new one.

54ceb95892ae4480bd00cacb024406ec.png
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robert AW, 2017-03-18
@Robert_bl

$(document).ready(function(){
  $('#bank').hide(); // по умолчанию скрыт
  $('#rating-bank').click(function() { // по клику открывается блок с id bank и закрывается с id micro
    $('#micro-zaim').hide(); 
    $('#bank').show();

  });

  $('#rating-micro').click(function() {
    $('#bank').hide();
    $('#micro-zaim').show();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question