title: Click event also fires focus event causing a function to run twice - jQuery
body: <p>I know this is probably a simple problem but I can't seem to find anything about it. I have the following code:</p>
  
  <pre><code>var moreitemsdiv = $('.moreitemsdiv');
  
  $('.moreitemsanchor').bind("focus click", function(){
      showList(this);
      return false
  });
  
  function showList(this_anchor){
      var thismoreitemsdiv = $(this_anchor).next(moreitemsdiv);
      if ($(thismoreitemsdiv).hasClass('focus')) {
          $(thismoreitemsdiv).removeClass('focus');
      } else {
          $(moreitemsdiv).removeClass('focus');
          $(thismoreitemsdiv).addClass('focus');
      }
  
  };
  </code></pre>
  
  <p>The 'focus' class is added on the click but as the click is also a focus, it then removes it as it runs the function again. Do I need to unbind and then re-bind or something?</p>
  
  <p>Any help would be great, cheers!</p>