How I can use a class name here in jQuery
<p>I want to use this for labels which contains <code>myClass</code></p>

<pre><code>if ($(field).val() != ""){
  var fieldId = $(field).attr("id");
  $("label[for='"+fieldId+"']").hide();
}
</code></pre>

<p>The above code is useful to put ID, but how I can use this for classes?</p>
