Highlight the lowest value
<p>after a mysql query i display this code</p>

<pre><code>&lt;div id="id1" style="border:1px solid red;" data-distance="31.5"&gt;
&lt;div id="id2" style="border:1px solid red;" data-distance="1.9"&gt;
</code></pre>

<p>the number of div, and the value of "data-distance" outputed can be different depending on mysql result.</p>

<p>What i want is to change style from "border:1px solid red" to "border:1px solid green" for the div wich have the lowest value for "data-distance".</p>

<p>In the exemple above it will be</p>

<pre><code>&lt;div id="id1" style="border:1px solid red;" data-distance="31.5"&gt;
&lt;div id="id2" style="border:1px solid green;" data-distance="1.9"&gt;
</code></pre>
