jQuery check if value not in array
<p>Tried to get this to work:</p>

<pre><code>var instance_name = $('#instance_name').val();
$("#instance_name").on("blur", function(e){
    if (!~$.inArray(instance_name, not_allowed)) {
        $("#instance_alert").html("&lt;font color=green&gt;Instance does not exists. Please continue&lt;/font&gt;");
    } else {
        $("#instance_alert").html("&lt;font color=red&gt;Instance exists. Please try another one.&lt;/font&gt;");
    }
</code></pre>

<p>But to no avail.. (Looked into <a href="https://stackoverflow.com/questions/14444586/how-to-check-if-a-value-is-not-in-an-array-using-jquery">How to check if a value is NOT in an array using jQuery</a>)</p>

<p>Any ideas why it still continues to say <code>Please continue Kindly</code>.</p>