title: li a needs to be clickable when no sub menu
body: <p>Hi I have an accordion menu, all working fine except if a section has no subcategory I need the link to go to the page rather than try to open a submenu that's not there.</p>
  
  <p>How do I implement this into this code?</p>
  
  <pre><code>$.noConflict();
  $(document).ready(function() {
  
          // Store variables
  
          var accordion_head = $('ul.accordion &gt; li &gt; a.item'),
              accordion_body = $('ul.accordion li &gt; ul.sub-menu');
  
  
          // Click function
  
          accordion_head.on('click', function(event) {
  
              // Disable header links
  
              event.preventDefault();
  
              // Show and hide the tabs on click
  
              if ($(this).attr('class') != 'active'){
                  accordion_body.slideUp('normal');
                  $(this).next().stop(true,true).slideToggle('normal');
                  accordion_head.removeClass('active');
                  $(this).addClass('active');
              }
  
          });
  
      });
  </code></pre>
  
  <p>HTML....</p>
  
  <pre><code>  &lt;div class="Block CategoryList Moveable" id="SideCategoryList"&gt;
  
     &lt;div class="BlockContent" id="dropDowns"&gt;
      &lt;ul class="accordion"&gt;
      &lt;li&gt;&lt;a href="http://site-link.co.uk" &gt;Main Category 1&lt;/a&gt;
      &lt;ul class="sub-menu"&gt;   &lt;li&gt;&lt;a href="http://site-link.co.uk" class="item"&gt;item 1&lt;/a&gt;
  
      &lt;/li&gt;   &lt;li &gt;&lt;a href="http://site-link.co.uk" class="item"&gt;item 2&lt;/a&gt;
  
      &lt;/li&gt;   &lt;li &gt;&lt;a href="http://site-link.co.uk" class="item" &gt;item 3&lt;/a&gt;
  
     &lt;/li&gt;    &lt;li &gt;&lt;a href="http://site-link.co.uk" class="item"&gt;item 4&lt;/a&gt;
  
      &lt;/li&gt;&lt;/ul&gt;
  
  &lt;/li&gt;   &lt;li &gt;&lt;a href="http://site-link.co.uk" class="item"&gt;Main Category 2&lt;/a&gt;
  
  &lt;/li&gt;   &lt;li &gt;&lt;a href="http://site-link.co.uk" class="item"&gt;Main Category 3&lt;/a&gt;
  
  
  &lt;/li&gt;
      &lt;/ul&gt; 
  </code></pre>