title: ($(window).scrollTop() > not working on IOS
body: <p>I am using below JS code to fix header at the top for mobile only.
  means if screen is scrolled for 80px  css classes will be replaced.
  working on android  and PC but no luck on Ios.
  any suggestions?</p>
  
  <pre><code>$(window).scroll(function () {
  if ($(window).width() &lt; 768) {
      if ($(window).scrollTop() &gt; 80) {
          $('.navbar-right').addClass('custom-fixed-top');
      }
      else{
          $('.navbar-right').removeClass('custom-fixed-top');
      }
  }
  });
  </code></pre>
  
  <p>HTML CODE</p>
  
  <pre><code>&lt;nav class="navbar navbar-default"&gt;
  &lt;div class="mid-container"&gt;
      &lt;div class="container-fluid"&gt;
          &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
          &lt;div class="navbar-header"&gt;
              &lt;button type="button" class="navbar-toggle collapsed hidden-xs" data-toggle="collapse"
                      data-target="#bs-example-navbar-collapse-1" aria-expanded="false"&gt;
                  &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;/button&gt;
              &lt;a class="navbar-brand" href="#"&gt;&lt;img src="images/logo.png" class="img-responsive" alt="logo"&gt;&lt;/a&gt;
          &lt;/div&gt;
  
          &lt;div class="navbar-collapse collapse in" id="bs-example-navbar-collapse-1" aria-expanded="true" style=""&gt;
              &lt;ul class="nav navbar-nav navbar-right"&gt;
                  &lt;li class="hidden-xs"&gt;&lt;a class="hdr-orng-btn" href="#"&gt;受付時間&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="hidden-xs"&gt;&lt;a class="" href="#"&gt;10：00～19：00&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a class="num" href="tel:03-0000-0000"&gt;TEL　03-0000-0000&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a class="hdr-grn-btn" href="#contact_form"&gt;お問い合わせ&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>.navbar-nav.custom-fixed-top{
  position: fixed;
  top: 0;
  width: 100%;
  height: auto;
  padding: 0 15px 15px;
  margin: 0;
  z-index: 2;
  background-color:#fff;
  left:0;
  </code></pre>
  
  <p>}
  this is the code.</p>