Same ID different Class using "this"
<p>I have two sets of items, one that I have my jQuery treating the class as a clickable item and  grabbing the id, it the performs a task upon the other set of corresponding items that has a different class but the same id.
Right now I've got it alerting me of the id like so:</p>

<pre><code>$(".class1").click(function(){
    alert(this.id);
});
</code></pre>

<p>Can I do the following to have it change the height of the correspond item:</p>

<pre><code>$(".class1").click(function(){
    $(".class2".this.id).animate({width:"400px", opacity:1}, 400 );
});
</code></pre>

<p>Edit (15:08 EST)</p>

<p>I actually have two separate DIVs acting on one another. I didn't know about the ID uniqueness rule, can I do the same thing by using a subclass in the second DIV like so?</p>

<pre><code>&lt;div class="class1"&gt;Click Me!&lt;/div&gt;
&lt;div class="class2 class1"&gt;Stuff happens here&lt;/div&gt;

$(".class1").click(function(){
    $(".class2 "+this.class).animate({width:"400px", opacity:1}, 400 );
});
</code></pre>
