title: Hide/Show if Count is Greater Than 5
body: <p>I am working in a WordPress theme and found a problem that I am a bit confused on. I am showing a list of offices in different cities. This is a custom taxonomy and I am using the following code to display a unordered list of terms.</p>
  
  <pre><code>$wpz_offices = get_the_term_list( $post-&gt;ID, 'office', '&lt;li&gt;', '&lt;/li&gt;&lt;li&gt;', '&lt;/li&gt;');
  echo $wpz_offices;
  </code></pre>
  
  <p>And it display exactly how it should but the problem is I would like to add a javascript toggle if the <code>&lt;li&gt;</code> exceeds <code>5</code>. I do not know enough about JavaScript to implement this so this is why I am asking for help. Is this possible using the available markup?</p>
  
  <p>So basically if the <code>&lt;ul&gt;</code> for the taxonomy has 4 or less terms then show normally</p>
  
  <ul><li>a</li><li>b</li><li>c</li><li>d</li></ul>
  
  <p>But if we have 5 terms show this</p>
  
  <p>To see all offices Click here</p>
  
  <p>Any help would be appreciated.</p>
  
  <p><strong>Update</strong>
  For those curious here is how I used the help from the answers 
  <a href="http://jsfiddle.net/KQBKu/" rel="nofollow">http://jsfiddle.net/KQBKu/</a></p>