title: jquery - each function order by class number
body: <p>i have a function, which search for class <code>step1, step2, step3....</code></p>
  
  <pre><code>$(this).find('[class*="step"]').each(function(){
  
  }
  </code></pre>
  
  <p>I want to run function ordering by class number, Like:</p>
  
  <pre><code>&lt;div class="myclass"&gt;
      &lt;div class="step4"&gt;..&lt;/div&gt;
      &lt;div class="step1"&gt;..&lt;/div&gt;
      &lt;div class="step3"&gt;..&lt;/div&gt;
      &lt;div class="step2"&gt;..&lt;/div&gt;
  &lt;/div
  </code></pre>
  
  <p>Now first run, step1 then step2 then step3 and so on</p>
  
  <p>I tried this code:</p>
  
  <pre><code>var i=1;
  $(this).find('.step'+i).each(function(){
      i++;
  }
  </code></pre>
  
  <p>is my above code is oky?? cuz I am running a each function on a single selector</p>