How do I make a floating menu -> position:static
<p>I want to make floating-menu <code>position:static(or position:absolute. bottom:(floating-menu's height))</code>, when it meets footer!</p>

<p>I made floating-bar originally <code>position:static</code>.</p>

<p>this operates moving up and down when scrolled.
I want to make this fixed or static..</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>$(window).bind(EVENT.SCROLL, function(){
  if(($(window).scrollTop() + $(window).height()&gt;= $('.footer-container').position().top)){ 
    $('#floating-bar').css({'position': 'static'});

  } else {
    $('#floating-bar').css({'position': 'fixed'});
  }

}).bind(EVENT.RESIZE, function(){
  if(that.SCALE[0] &gt; 900) sticky_sidebar();
});</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>#floating-bar{ 
  display:block; 
  text-align: center; 
  bottom: 0; 
  position: static; 
  width: 100%; //position:fixed;
   .check-price {
     float:left; 
     padding: 20px 16px; 
     line-height: 23px;
     background-color: #f1f4ff; 
     color: @emp-color; 
     font-size: 1.07em;
   }
   .order {
     margin-left: 82px; 
     padding: 20px 63px; 
     background-color: @emp-color; 
     color: #fff; 
     font-size: 1.38em;
   }
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
&lt;div id="floating-bar"&gt;
  &lt;div class="check-price"&gt;가격 확인&lt;/div&gt;
  &lt;div class="order"&gt;R5 멤버십 신청하기&lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>