title: Twitter bootstrap change affix offset
body: <p>I have site where I want 'sub navigation'. So when you scroll to section, its tool bar will affix below the main toolbar. I have this working, but I can't change the top offset after initailization. The docs say: </p>
  
  <blockquote>
    <p>affix('refresh')</p>
    
    <p>When using affix in conjunction with adding or removing of elements
    from the DOM, you'll want to call the refresh method:</p>
  </blockquote>
  
  <p>but when I try this I get:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Object # has no method 'refresh'</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>$(function () {
      $('.sec-nav').addClass("affix-top");
      var adjustNavs = function (first) {
          $('.sec-nav').each(function (){
              var $p = $(this).closest('.sec');
              var $$ = $p.prevAll('.sec');
              console.log($$);
              var h = 0;
              $$.each(function () { h+=$(this).outerHeight();});
              console.log(h);
  
              if (first) {
                  $(this).affix({offset: {top: h}});
              } else {
                  $(this).data('affix', {b: {options: {offset:{top: h}}}});
                  console.log(this);
                  $(this).affix('refresh')
              }
  
          });
      }
      adjustNavs(true);
      $('.sec').bind('DOMSubtreeModified', function () {
          adjustNavs();
      });
  });
  </code></pre>
  
  <p>I've tried different variation of </p>
  
  <pre><code>                $(this).data('affix', {b: {options: {offset:{top: h}}}});
  </code></pre>
  
  <p>including:</p>
  
  <pre><code>                $(this).affix({offset: {top: h}});
  </code></pre>
  
  <p>I cannot get the offset to change. How do you change the offset of the affix plugin? Thanks.</p>