jquery toggle one div when other activated
<p>I really stuck with my code, It's working fine except one thing, I need to close any opened divs, when I click other div to open, here is my code:</p>

<pre><code>function readFaq() {

$('.find-faq-inner h3').prepend('&lt;span id="spanfaq" class="faq-open"&gt;&lt;/span&gt;');

$('.find-faq-inner h3').each(function () {
    var tis = $(this), state = false;
    var answer = tis.next('div').hide().css('height', 'auto').slideUp();

    tis.click(function () {
        state = !state;
        answer.slideToggle(state);
        tis.toggleClass('active', state);

        if (state == true) {
            tis.find('#spanfaq').removeClass('faq-open');
            tis.find('#spanfaq').addClass('faq-close');
        }
        else {
            tis.find('#spanfaq').removeClass('faq-close');
            tis.find('#spanfaq').addClass('faq-open');
        }

    });
    });
}


&lt;div class="find-faq-inner"&gt;
    &lt;div class="text"&gt;
    &lt;h3&gt;FAQ1&lt;/h3&gt;
    &lt;div&gt;
    text of faq
    &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Any ideas would be helpful, Thanks</p>
