title: jquery ui dropdown check if visible or not
body: <p>I'm using the autocomplete position option to flip the dropdown which works as long as the drop down is long enough to reach the edge of the window...</p>
  <pre><code>position: {
          my: &quot;left top&quot;,
          at: &quot;left bottom&quot;,
          collision: &quot;flip flip&quot;
      },
  </code></pre>
  <p>... but if the list isn't long enough it won't flip and gets hidden behind another element as seen in the following image...</p>
  <p><a href="https://i.stack.imgur.com/RQkR7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RQkR7.jpg" alt="enter image description here" /></a></p>
  <p>What I'm trying to do is determine when the dropdown is hidden or if scrollbars appear which ever is easier and if it is flip the dropdown.</p>