title: JQuery .each loop not working when iterating through elements with dynamic class name
body: <p>The .each loop below doesn't work when I use variables to search for elements with the same class name as the variable's value. The result; No alert occurs.</p>
  
  <pre><code>var NameString = $("#StoreInputs").val();
  var NameArray = NameString.split(",");
  for(var i = 0; i &lt; NameArray.length; i++){
  $('.' + NameArray[i]).each(function(n, obj){
    alert(obj.val());
      });
  }
  </code></pre>