how do I write a `is_a_last_of_b(a, b)` to check whether `a` is the last child of `b`
<pre><code>a = $('div:first');
b = $('div');
</code></pre>

<p><code>b</code> may contain multiple DOM elements.</p>

<p>But <code>a</code> only contains 1 element.</p>

<p>How do I know if <code>a</code> is the last element of <code>b</code>?</p>

<p>I tried <code>a == $('div:last')</code>,but it's wrong after my test.</p>

<p>And if <code>a</code> is an element of <code>b</code>, how do I get the sibling of <code>a</code> within <code>b</code>?</p>

<p><strong>Clarify</strong></p>

<p>the problem is how I can write a <code>is_a_last_of_b(a, b)</code> to check whether <code>a</code> is the last child of <code>b</code>.</p>

<p>And if <code>a</code> is a direct child of <code>b</code>,how to write <code>next_sibling(a)</code> to return the next sibling of <code>a</code>(only one)?</p>
