title: Can I define variables as arguments?
body: <p>I have the following use of jQuery UI function:</p>
  
  <pre><code>$('.droppable').droppable({
      tolerance: 'touch',
      over: function () {
          var hasHiddenList = $(this).children('ul.hidden');
          if (hasHiddenList.length)
              hasHiddenList.removeClass('hidden');
      },
      out: function () {
          var hasEmptyList = $(this).children('ul.empty');
          if (hasEmptyList.length)
              hasEmptyList.addClass('hidden');
      },
      drop: function () {
          var hasEmptyList = $(this).children('ul.empty');
          if (hasEmptyList.length)
              hasEmptyList.removeClass('empty');
      }
  });
  </code></pre>
  
  <p>And I am wondering if I can define the variables <code>hasHiddenList</code> and <code>hasEmptyList</code> outside the callback functions, since it is the same variable in all of them.</p>