Insert something .after a set of elements if the first in the set has a certain class
<p>I would like to add a label AFTER a group of radio inputs IF the first has a certain class</p>

<pre><code>&lt;label&gt;Has the strategy and all of it's relevant background documents been uploaded&lt;/label&gt;

&lt;label for="Radio1"&gt;&lt;input type="radio" name="uploaded" class="required cat1" id="Radio1"&gt;Yes&lt;/label&gt;

&lt;label for="Radio2"&gt;&lt;input type="radio" name="uploaded" id="Radio2"&gt;No&lt;/label&gt;
</code></pre>

<p>Radio1 has the class, but I'd like to insert a label after the last (in this case Radio2)</p>

<p>I thought I could use this: </p>

<pre><code>$('input[type="radio"].cat1').siblings('input:last').after('&lt;label&gt;Hi!&lt;/label&gt;');
</code></pre>

<p>But it doesn't work. Can you pick what I am doing wrong?</p>
