Goal:
I want to hide the alphabet "a b c d" and when it is hidden, the arrow shall display with arrow down.
https://cdn3.iconfinder.com/data/icons/iconic-1/32/arrow_down_alt1-16.png.
It should be a default settings.
When you press the "Hide Text" you toggle out and change the arrow botton into upp and display the text and also you change the text from "Hide Text" into "Show Text"
https://jsfiddle.net/mxt2pthw/15/
var flip = 0;
$('#test ').click(function() {
$( "#aaa" ).toggle( flip++ % 2 === 0 );
});
<div id="aaa">
a <br/>
b <br/>
c <br/>
d <br/>
</div>
<div id="test">
Test <img src="https://cdn3.iconfinder.com/data/icons/iconic-1/32/arrow_up_alt1-16.png" />
</div>