title: prevent resize parent behind child
body: <p>do resize <code>targ</code> from bottom to top<br>
  when <code>targins</code> is reached I want to force - stop resizing<br>
  current code allows child to be visually outside of parent and that's what I need to prevent<br>
  Any help?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function(){
   $('#targ, #targins').resizable({
    handles: 's'
   });
   $('#targins').draggable({
    axis: 'y',
    containment: 'parent'
   });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.targ{
   width:45%;
   margin:0 auto;
   background:#ddd;
   height:79px;
  }
  
  .targins{
   position:relative;
   width:100%;
   display:grid;
   align-items:center;
   background:gold;
    text-align:center;
    top:25px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"&gt;
  &lt;div class='targ' id='targ'&gt;
  &lt;div class='targins' id='targins'&gt;LOREM IPSUM&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>