Append Order - jQuery
<p>I am trying to get the string to order by how it is displayed (red,blue,orange,black). For some reason, it will append the order randomly. For Example: it would output (blue,orange,red,black). Any help would be great. Thanks.</p>

<pre><code>var tCookie = "red,blue,orange,black";
var Cookies = tCookie.split(',');

if (Cookies) {
    for (var i = 1; i &lt;= Cookies.length; i++) {

        var dataString = "TabId="+Cookies[i]+"";

        $.ajax({
            type: "POST",
            url: "includes/tab.php",
            data: dataString,
            cache: false,
            success: function(html){
                $("#Dynamic_Tab").append(html).children(':last').hide().fadeIn("fast");
            }
        });
    }
}
</code></pre>
