title: comparison of multiple input fields with same class name but not same id using jQuery
body: <p>I want to make jquery/javascript function which compare multiple values with each other if one of them comes out different then echo "Values are different" next to every field present in html body.     </p>
  
  <p></p>
  
  <pre><code>&lt;input name="flag2" type="text" id="flag2" class="flags"&gt;
  
  &lt;input name="flag3" type="text" id="flag3" class="flags"&gt;
  
  &lt;input name="flag4" type="text" id="flag4" class="flags"&gt;
  
  &lt;input name="flag5" type="text" id="flag5" class="flags"&gt;
  
  &lt;input name="flag6" type="text" id="flag6" class="flags"&gt;
  </code></pre>
  
  <p>Note: I use a button with jquery function to add new field on press, is using appendTo to add more fields. sometimes i have more or less fields, the jquery function must be dynamic, to apply on the number of input fields set.</p>