Javascript function help needed
<p>I'm trying to hide one div and show another, when a button is clicked.  The button needs to change class after click.</p>

<p>I tried to change these this with <code>toggleClass</code> and <code>toggleSlide</code>, but it didn't work. Now I just try to show and hide divs onclick. It seems to work somehow, but <code>removeClass</code> won't work.</p>

<p>Can somebody understand what's wrong? Or is there better way to do it?</p>

<p>Maybe I can make it with toggle array or something, that simplifies the code or click counts (<code>if count c++%2!=2</code>), don't even know if that's possible.</p>

<pre><code>$('div.more-lang').hide();
$('div.lang-arrow').click(function () {
    $('div.lang-arrow').addClass('more');
    $('#lang').hide('');
    $('div.more-lang').show('');
});

$('div.lang-arrow.more').click(function () {
    $('div.lang-arrow').removeClass('more');
    $('div.more-lang').hide('');
    $('#lang').show('');
});
</code></pre>
