title: Is there any jquery Context Menu plugin smart enought to deal with window borders?
body: <p>I've looked at <a href="http://visionmedia.github.com/uikit/" rel="nofollow noreferrer">UIkit</a>, and some other jQuery Context Menu Plugin's but they all tend to behave like this:</p>
  
  <p><img src="https://i.stack.imgur.com/jGyax.jpg" alt="enter image description here"></p>
  
  <p>As you can see actual div with menu renders outside the window and so valuable content is not visible.</p>
  
  <p>Is there any way to make a pop up div (say div has id <code>menu</code>) auto stick to right border on its own when there is not enough space using jQuery (meaning when it does not fit into current window borders move itself left so that it would appear where needed) like that:</p>
  
  <p><img src="https://i.stack.imgur.com/aWAZa.jpg" alt="enter image description here"></p>