title: How to show hide dynamic parse divs?
body: <p>I have a form with a select menu with the values 1,2,3,4. When 3 is selected 3 sub div's are visible, but with 1 select just 1 is visible. </p>
  
  <p>I created some simple span div which holds the input fields per user</p>
  
  <pre><code>&lt;span id="ticketuser1"&gt;....&lt;/span&gt;&lt;span id="ticketuser2"&gt;....etc
  
  $('#numOfTickets').change(function() {
                  var num= $("#numOfTickets").val();
  
                  for (var i=0;i&lt;num;i++){ 
                      if(i&gt;num){
                          $('#ticketuser'+i).hide();
                      } else {
                          $('#ticketuser'+i).show();
                      }
                  }
  
          });
  </code></pre>
  
  <p>Now from 2 to 3 to 4 goes as expected but selecting a lower number doesn't do the trick.</p>
  
  <p>Any tips?</p>