title: jQuery: How to hide all HTML elements which have a value greater than a certain value for a given tag
body: <p>I display elements in a hierarchy, clicking one displays the next set of elements in the hirearchy. Each element has a tag called "level" which has some value which is 1-.... (whatever the number of levels is for that branch of the tree).</p>
  
  <p>When an element is clicked I want the next elements to be displayed, but if an element is clicked and it's subelements have already been displayed I want to hide all subelements.</p>
  
  <p>More formally:
   when an element with level = x is clicked
     if no elements with level > x are displayed 
       then display all elements such that level = x+1
     but if some elements with level > x are displayed
       then hide all elements where level > x</p>
  
  <p>How would I create a jQuery selector that captures this. </p>