Newbie in jQuery - focusIn and out on textareas
<p>I'm stuck with my code. I use the focusin() function to detect the user interaction on a textarea. My concept: </p>

<ul>
<li>first init => all are collapsed with auto-height (50px)</li>
<li>first focus-in => the focused element will be expanded to more pixels (150px)</li>
<li>and now, I know, every time I get a new focusin on any of my elements, I had one, that are currently opend. Therefore I created a primitive routine for that idea:</li>
</ul>

<hr>

<pre><code>var active = false;
myTextAreas.focusin(function() { 
    if (active == true) {
        myTextAreas.animate({"height" : 50}, 300);
        $(this).animate({"height" : 150}, 500); 
    } else {
        $(this).animate({"height" : 150}, 500);
        active = true;
    };
</code></pre>

<p>myTextAreas => Object with my HTML-elements (textareas). First time => do the else, second time => always the if-statement, which resizes all elements every time back AND than move my element up to more height. It works principally, BUT the first time when I do my little script, my box is resizing first and against the end the other box, which are the new focused-in-one, are starting too early with the new animate() function. Then it works... hmmm. But I think my code is not so pretty?</p>

<p>One feature I miss in my concept. When I focusout of any textarea, I want to animate all elements back, similar to the effect in my if-statement. But how can I say, do that, but only on the rest of my elements and not on my focus-in-textareas? </p>

<p>Maybe my concept is bad? I'm opened for a new one ... by the way.</p>
