網(wǎng)頁定位導(dǎo)航效果問題
<script src="jquery-1.7.2.min.js"></script>
????? <script>
??????? jQuery(document).ready(function($) {
??????????? $(window).scroll(function(event) {
??????????????? var dTop = $(document).scrollTop();
??????????????? //console.log(top);
??????????????? $('.item').each(function(index, el) {
??????????????????? var iTop = $(el).offset().top-350;
??????????????????? //console.log(iTop);
??????????????????? if( dTop > iTop){
?????????????????????? var currIndex = $(el).index();
?????????????????????? //console.log(currIndex);
??????????????????? }else{
??????????????????????? return false;
??????????????????? }
??????????????????? $('#menu a').eq(currIndex-1).addClass('current').siblings().removeClass();???????????? ?
??????????????? });
??????????? });
??????? });
????? </script>
左側(cè)滾動(dòng)時(shí),右側(cè)顯示對應(yīng)的樓層,但怎么讓其它樓層的樣式消失,用removeClass不起作用?