HTML
<div id='button'></div>
<div id="mydiv">ko</div>
JS
$('#button').click(function () {
$('#mydiv').text('ok');
});
CSS
#button{
width:100px;
height:100px;
background-color:red;
}
When the button is clicked, the text inside 'mydiv' changes. I am looking for a way to toggle between two values ('ok' and 'ko') every time the button is clicked. Is there a solution for this?