Question: I have this example of Collapse row on mouse click:

```
jsfiddle.net/7bz5au97/

```

I would like to ask you how I can add arrow like this one at the beginning of the question and rotate it when the question is expanded?

![enter image description here](https://i.stack.imgur.com/nKYFI.png)

Can this be done with CSS only or I need also to add JavaScript?

Answer: 
You could do this almost entirely with css:

```js
var arr = document.querySelector('.arrow');
arr.addEventListener('click', function(event) {
  event.target.classList.toggle('down');
});
```

```css
.arrow {
  margin: 1em;
}

.arrow::before {
  position: absolute;
  content: '';
  width: 0;
  height: 0;
  border: .5em solid transparent;
  border-left-color: gray;
  transform-origin: 0 50%;
  transition: transform .25s;
}

.arrow.down::before {
  transform: rotate(90deg);
  transition: transform .25s;
}
```

```html
<div class="arrow"></div>
```
Here is an update of your jsfiddle <https://jsfiddle.net/7bz5au97/1/>

I just added 

```
$('body').click(function() {
$( 'img' ).toggleClass('rotate');
});

```

and rotate to the img