something wrong in this j query
<pre><code>function dowork()
{
    $(".wrappedElement").removeClass("wrappedElement");
    $(".wrappedElementout").removeClass("wrappedElementout");
    var a=$("div#DepPart select option:selected").val();

    $("div#TestPart select option[value^=a]").addClass("wrappedElement");
    $("div#TestPart select option[value!=a]:not(div#TestPart select option[value^=a])").addClass("wrappedElementout");
}
</code></pre>

<p>In this function var a gets the value (a="HMT") in string format and when i uses this value as part of the jQuery selector it does't work for some reason. Can anybody suggest what the solution may be?</p>
