Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
  
</head>
<body><br><br>
<div>
  <span class="reviews__btn-comment">
  <a href="#" class="reviews__commentaries value-commentaries">Click</a>
    <svga>fgd</svga>
  </span>
  <div class="reviews__response-comment"><p>1</p></div>
  <div class="reviews__response-comment"><p>2</p></div>
  
  </div>
</body>
</html>
 
.reviews__response-comment{
  -webkit-transition: height .3s ease;
  height: 0;
  overflow: hidden;
}
.reviews__response-comment.slide-tooggle {
  height:100px;
}
 
document.querySelector('.reviews__commentaries.value-commentaries').addEventListener('click', function(){
    this.parentNode.nextElementSibling.classList.toggle('slide-tooggle');
    this.parentNode.nextElementSibling.nextElementSibling.classList.toggle('slide-tooggle');
    this.nextElementSibling.classList.toggle('rotate-comment');
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers