Here is my code:
$('.click').on('click', function(){
$(this).next('div').toggle(100);
});
.click{
cursor: pointer;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="click">click <i class="fa fa-caret-down" aria-hidden="true"></i></div>
<div>something</div>
As you see that arrow (which is next to click
) is fixed .. How can I rotate it 45° when user click on the div.test
?