0
我想添加兩個粘貼(向上和向下)頁面中間的arroys,可以滾動一個網頁分爲幾個部分。所以箭頭始終位於第二部分到最後一部分的中間,並讓頁面向上或向下滾動。jquery sticked向上和向下箭頭向上和向下
目前,我有一個按鈕,帶我到網頁
.content-wrap section .back-to-top {
display: block;
position: absolute;
bottom: -65px;
right: 10px;
height: 36px;
width: 36px;
background: url(http://www.caddet-re.org/assets/images/Arrow_Circle_Up.gif);
text-indent: -9999px;
z-index: 2;
}
<a class="back-to-top" href="#main">Back to Top</a>
頂給我:
的STRU該部分的cture是:
<div class="content-wrap">
<section id="main">
<!--content-->
</section>
<section id="portfolio">
<!--content-->
</section>
...
</div>
有沒有什麼方法可以在第二部分之後顯示箭頭?我的意思是,在#部分#中沒有顯示箭頭,之後它們顯示出來... like'if($('selector')。hasClass('main')) { $(this).removeClass (「主要」); $(this).addClass(「hidden」); }'是否正確? – cMinor 2013-02-26 16:14:22
我更新了答案:-) – BorisD 2013-02-27 06:11:11