function dawn(input) { input.value = input.value != 'close' ? 'close' : 'open' } $(function(){ $("#closeinput").click(function () { $("#closediv").slideToggle("slow"); }); });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id='closediv'> <b>Правило.</b> Ё должна использоваться: в случаях возможных разночтений; в словарях; в книгах для изучающих русский язык (т. е. детей и иностранцев); для правильного прочтения редких топонимов, названий или фамилий. Во всех остальных случаях наличие буквы ё только затрудняет чтение. Она плохо выглядит, зато хорошо звучит. </div> <input type="button" id='closeinput' value="close" onclick="dawn(this)">
I need instead of the open / close button there was a picture that is izmenyaetsya Ie for example down arrow instead of open button (open.png) and up arrow instead of close (close.png)
IMPORTANT! Initially, the block must be OPEN!