http://koszyk.cba.pl/rec/test/asd/index.html
Chciałem otrzymać coś takiego jak tutaj:
http://www.bootply.com/69848#
Mianowicie chodzi o boczne menu
<!--left--> <div class="col-md-3" id="leftCol"> <ul class="nav nav-stacked affix-top" id="sidebar"> <li><a href="#sec0">Section 0</a></li> <li><a href="#sec1">Section 1</a></li> <li><a href="#sec2">Section 2</a></li> <li><a href="#sec3">Section 3</a></li> <li><a href="#sec4">Section 4</a></li> </ul> </div> <!--/left-->
Wyświetla się ono tylko 3/4 nie wyświetla ono wcześniejszych elementów chociaż weług wzoru powinno. Sądzę, iż jest to wina javascriptu( gdyż zwiększyłem objętość navbara) lecz zmiany w js nie dają rezultatu.
Tu jest kod odpowiedzialny za to:
/* activate sidebar */ $('#sidebar').affix({ offset: { top: 235 } }); /* activate scrollspy menu */ var $body = $(document.body); var navHeight = $('.navbar').outerHeight(true) + 10; $body.scrollspy({ target: '#leftCol', offset: navHeight }); /* smooth scrolling sections */ $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top - 50 }, 1000); return false; } } });
Ma wyjśc efekt jak w linku czyli jakby nie przewijanie się tego menu.
Wskaże mi ktoś co ja robię nie tak? Będę bardzo wdzięczny.