title: How to unify access to elements with ordinal id using JQuery?
body: <p>I have several almost identical elements on the page. They differ only in their id - id="id1", id="id2", ..., id="id10"
  I have a JQuery code that looks something like this:</p>
  
  <pre><code>$('.element #set1 .select').on('mouseleave', function(){
      if ($('.element #set1 .select .options:visible').length) {
      $('.element #set1 .select .options').slideUp('fast');
      $('.element #set1 .select a.value').addClass('selected').text('1');
  }});
  </code></pre>
  
  <p>...</p>
  
  <pre><code>$('.element #set10 .select').on('mouseleave', function(){
      if ($('.element #set10 .select .options:visible').length) {
      $('.element #set10 .select .options').slideUp('fast');
      $('.element #set10 .select a.value').addClass('selected').text('1');
  }});
  </code></pre>
  
  <p>Is there a way how to use only one unified code to access all sets with different ids?</p>