min / max functionality in jQuery
<p>How would you find using jQuery an element with maximal "page" value which is less than "6" ?</p>

<p>Suppose that "page" has only numerical values, and that the elements are sorted by "page". For example:</p>

<pre><code>&lt;div id="wrapper"&gt;
  &lt;div page="1"&gt;&lt;/div&gt;
  &lt;div page="2"&gt;&lt;/div&gt;
  &lt;div page="4"&gt;&lt;/div&gt;      =&gt; answer
  &lt;div page="6"&gt;&lt;/div&gt;
  &lt;div page="7"&gt;&lt;/div&gt;
  &lt;div page="9"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
