Sorting the colors using jquery
<p>I have created a color grid with 1 row.Now I want my colors in the grid to get sorted according to this order "blue","red","green","yellow","orange","pink","brown","black"
 using jquery.Is it possible???
Html:</p>

<pre><code>&lt;body style="background-color:#663366"&gt;
&lt;div class="form-group" &gt;
&lt;div class="col-sm-5"&gt;

&lt;table  border="5px" width="500px" height="50px" align="center"&gt;
&lt;tr id="colors"&gt;
&lt;td  height="50px" bgcolor="red"&gt;&lt;/td&gt;
&lt;td height="50px"  bgcolor="brown"&gt;&lt;/td&gt;

&lt;td height="50px"  bgcolor="pink" &gt;&lt;/td&gt;
&lt;td  height="50px"  bgcolor="blue" &gt;&lt;/td&gt;

&lt;td height="50px"  bgcolor="black"&gt;&lt;/td&gt;
&lt;td height="50px"  bgcolor="green"&gt;&lt;/td&gt;

&lt;td height="50px"  bgcolor="orange" &gt;&lt;/td&gt;
&lt;td height="50px"  bgcolor="yellow"&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;/table&gt;

&lt;/div&gt;
&lt;/div&gt;


&lt;/body&gt;
</code></pre>

<p>Here's the fiddle: <a href="https://jsfiddle.net/n6msyp8m/2/" rel="nofollow">https://jsfiddle.net/n6msyp8m/2/</a></p>