title: jQuery hide box
body: <p>The problem is quite simple. When I click on visible image all the boxes which were appeared should dissapear and on active field it should appear. The thing is when I click on the same field twice the box does not dissapear. </p>
  
  <p>I hope my code will explain more what I want to do.
  Code:</p>
  
  <p><strong>jquery:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          var img = $('.users_table tr .user_gear').find('img');
          //var dropdown = $('.users_table tr .user_gear').next('.user_arrow_box');
  
          if((img).is(':visible') == true){
              img.click(function(){
                  var all = $('.users_table tr .user_gear').find('.user_arrow_box');
                  var a = $(this).parent().find('.user_arrow_box');
                  a.toggle(function() {
                      all.removeClass('active');
                      a.addClass('active');
                  }, function() {
                      a.removeClass('active');
                  });
  
                  return false;
              });
          }
      });
      &lt;/script&gt;
  </code></pre>